2017-02-01 61 views
0

的顏色的BTN-默認顏色是white.But我無法改變的BTN-默認如何改變BTN-默認

<div class="pageOne"> 
    <h1 class="text-center" id="header_text"> a Good Tree production </h1> 
    <div class="btnList"> 
     <a class="btn btn-default" href = "#"> a Good Tree production</a> 
     <a class="btn btn-default" href = "#"> About Us</a> 
     <a class="btn btn-default" href = "#"> Contact Us</a> 
     <a class="btn btn-default" href = "#"> Works</a> 
    </div> 
</div> 

這裏的顏色是CSS

.btn-default{ 
    background-color: black !important; 
} 
#header_text{ 
    font-family: 'Boogaloo', cursive; 
    color: white !important; 
} 

任何人都可以幫助我。

+0

工作對我來說HTTP://www.bootply。 com/KFcqllfiQN – j08691

回答

0

Bootstrap CSS覆蓋你的。您需要提供更高級別的CSS選擇器,如:

#header_text .btn-default { 
    background-color: black !important; 
} 

這是級別高於引導選擇,那就是:

.btn.btn-default { 
    /* Whatever their CSS is */ 
} 
+0

.btn.btn-default { \t background-color:black!important; } #header_text { \t font-family:'Boogaloo',cursive; \t顏色:白色!重要; \t}但它仍然不起作用 –

+0

沒錯,沒有注意到'!important'。我沒有看到任何理由不工作,也許你應該檢查你的CSS是否真的顯示出來。你有我們可以看的現場版嗎? – TricksfortheWeb

+0

https://jsfiddle.net/VijayVj7/trbddvet/1/這是現場輸出的鏈接 –