我的HTML文本輸入元素如下:input [type = text] Vs.類細節
<div class="form-group">
<label>Ask</label>
<input type="text" name="ask_question" class="form-control" id="ask-question">
</div>
有兩種樣式表「A」和「B」試圖修改此元素。
A被加載之前B.
A指定:
input[type=text] {
blah;
blah;
}
乙指定:
.form-control {
meh;
meh;
}
現在,瀏覽器顯示從樣式表中的 'A',而不是 'B' 的樣式。有什麼辦法可以忽略'A'並使用'B'的樣式?
注意:Stylesheet'B'實際上是bootstrap.min.css,它不指定屬性樣式,因此我無法覆蓋'A'的樣式。如果你能指出我正確的方向,我將不勝感激。謝謝!
將'!important'添加到要在樣式表B中重寫的css規則應該解決您的問題 – sa77