0
我試圖將特定的CCS應用於我的md-contact-chips
中的一個Angular Material
。這是一塊HTML的:如何將自定義CSS應用於角度材質md-contact-chips
<div class="col-xs-10 col-xs-offset-1" style="height:20%;background:rgb(255, 255, 255);border-radius: 20px;border: 3px solid #A3AB45;margin-bottom:20px">
<md-contact-chips id="transform-tags"
ng-model="contacts"
md-contacts="querySearch($query)"
md-contact-name="name"
md-contact-image="image"
md-contact-email="email"
md-require-match="true"
md-highlight-flags="i"
filter-selected="filterSelected"
placeholder="Categories">
</md-contact-chips>
</div>
這是CCS
代碼:
.md-chips.md-focused {
box-shadow: none !important;
}
.md-chips {
box-shadow: none !important;
}
這按預期工作,但它被應用到所有md-contact-chips
,我只希望它僅適用於一個ID爲transform-tags
,所以我修改CCS
這樣:
#transform-tags.md-chips.md-focused {
box-shadow: none !important;
}
#transform-tags.md-chips {
box-shadow: none !important;
}
但是,當我做到這一點,我CCS
沒有被應用了!我需要做些什麼來將CCS
應用於Angular Material
元素?
你確定#transform-tags有一個附加的css類嗎?也許這是下面的一個元素 – Ozrix