3 回答

TA貢獻(xiàn)1111條經(jīng)驗(yàn) 獲得超0個(gè)贊
!important
身份證100分 類和偽類10分 標(biāo)記選擇器和偽元素的1點(diǎn) 注意:如果元素具有內(nèi)聯(lián)樣式 (1000點(diǎn))
<body id="bootstrap-overrides">
/* Example selector defined in Bootstrap */.jumbotron h1 { /* 10+1=11 priority scores */ line-height: 1; color: inherit;}/* Your initial take at styling */h1 { /* 1 priority score, not enough to override Bootstrap jumbotron definition */ line-height: 1; color: inherit;}/* New way of prioritization */#bootstrap-overrides h1 { /* 100+1=101 priority score, yay! */ line-height: 1; color: inherit;}

TA貢獻(xiàn)1798條經(jīng)驗(yàn) 獲得超7個(gè)贊
始終在基本CSS文件之后加載自定義CSS(不響應(yīng))。 避免使用 !important
如果可能的話。它可以覆蓋基本CSS文件中的一些重要樣式。 如果不想丟失媒體查詢,請始終在custom.css之后加載引導(dǎo)-responsive.css。-必須跟隨 更喜歡修改所需的屬性(不是全部)。
添加回答
舉報(bào)