2017-04-13 18 views
0

アイコンで箇条書きしたブートストラップリストグループがあります。最初のアイコンをリストグループから削除しようとしています。これどうやってするの?ここに私のコードは次のとおりです。ブートストラップリストから単一の箇条書きアイコンを削除する

<ul class="list-group" id="vacationList"> 
       <li class="list-group-item text-center" id="vacationListTitle">Our in-home pet care includes the following care treatment:</li> 
       <li class="list-group-item">All the love, attention, kissing and scracthing your pet deserves</li> 
       <li class="list-group-item">Walk, exercise, playtime or visit</li> 
       <li class="list-group-item">Food, treats and fresh water as needed</li> 
       <li class="list-group-item">Trash and pet waste removal</li> 
       <li class="list-group-item">The administration of medicine</li> 
       <li class="list-group-item">Gathering of of all mail</li> 
       <li class="list-group-item">Watering of all plants and garden</li> 
       <li class="list-group-item">Report card including the time of the visit and details of the pet care experience</li> 
       <li class="list-group-item">In additional we are prepared to accomodate any other unlisted and reasonable needs</li> 
       <li class="list-group-item">$65 includes overnight stay from 8:00 pm until 7:00 am and 1 late afternoon visit. Includes care for 2 pets ($3 per additional pet)</li> 
      </ul> 
#vacationListTitle { 
    background-color:map-get($colorMap, orangeColor) !important; 
    font-family:$headerFont; 
    font-size:1.3em; 
    content:none !important; 
    padding-left:0px !important; 
} 

#vacationList { 
    margin:0 auto; 
    border-radius:5px; 

    li { 
    padding-left:30px; 
    } 

    li:nth-child(odd) { 
    background-color:#e5e5e5; 
    } 

    li:before { 
    /*Using a Bootstrap glyphicon as the bullet point*/ 
    content: "\e080"; 
    font-family: 'Glyphicons Halflings'; 
    font-size: 9px; 
    float: left; 
    margin-top: 4px; 
    margin-left: -21px; 
    color: #555; 
    } 
} 

クラス名vacationListTitleとリスト項目は、私はからアイコンを削除したいものです。何かご意見は?

ありがとうございました!あなたは、具体的::before擬似要素をターゲット、displayプロパティでこれを行うことができます

+1

'#vacationListTitle:前{表示:なし。 } '? –

+0

ありがとうございました。 – Brixsta

答えて

1

#vacationListTitle::before { 
    display: none; 
} 
+0

このマークアップは、そのリスト項目を消滅させます。アイコンが消えてしまいたい – Brixsta

+0

@Brixstaああ、申し訳ありませんが、私はあなたの質問のその部分を逃した。私は私の答えを変更しました。 –

+0

ありがとうございます。 – Brixsta

1

あなたはvacationList

の李
#vacationList { 
    ..... 
    ..... 
    ..... 
    li:first-of-type:before { 
     content: ""; 
    } 
} 

前に、最初のコンテンツを削除することができますまたは、IDを使用することができます#vacationListTitle

#vacationListTitle:before { 
     content: ""; 
    } 

See demo here

+0

OPの例でアイコンを追加するセレクタよりも特異性が低いので、これは機能しません。 –

+0

彼はsassを使用しているので、#vacationList {....}の中に追加する必要があります – Chiller

関連する問題