2016-12-26 34 views
0

不記得如何覆蓋html中a.node需要爲藍色的css工作表中的背景。在我的HTML我有style="background:blue" SO的幾個例子還沒有解決這個問題 - 他們是相似的,但無法解決。js-mindmap CSS重寫樣式表的背景顏色

我的CSS頁面:

body { 
background:black; 
} 
.js-mindmap-active a.node { 
    background:red; 
    border: 2px solid white; 
    -webkit-border-top-left-radius: 20px; 
    -webkit-border-bottom-right-radius: 20px; 
    -moz-border-radius-topleft: 20px; 
    -moz-border-radius-bottomright: 20px; 
    border-top-left-radius: 20px; 
    border-bottom-right-radius: 20px;  
} 
.js-mindmap-active a.node.active { 
    padding:5px 10px !important; 
    border-width:5px !important; 
} 
.js-mindmap-active a.node.activeparent { 
    padding:5px 10px !important; 
    border-width:5px !important; 
    background:#8B0000; 
} 

HTML:

<body> 
    <ul> 
    <li><a href="http://sample.com/">ALS</a> 
     <ul> 
     <li><a href="#" target="_blank" style="background:blue">Chest Pain</a></li> 
     <li><a href="#" target="_blank" class="icon linkedin">Shortness of Breath</a></li> 
     <li><a href="#" target="_blank" class="icon facebook">Allergic Reaction</a></li> 
     <li><a href="http://www.google.com" target="_blank" class="icon twitter" title="goo">Diabetic</a></li> 
     <li><a href="#">STEMI</a> 
     <ul> 
      <li><a href="#" target="_blank" class="icon twitter" title="9">ACS</a></li> 
      <li><a href="#" target="_blank" class="icon twitter" title="13">STEMI</a> 
       <ul> 
       <li><a href="#" title="A">Treatment</a></li> 
       <li><a href="#" title="C">Protocol</a></li> 
       </ul> 
      </li> 
     </ul> 
     </li> 


     </ul> 
    </li> 
    </ul> 
</body> 
+0

你可以把'b ackground:blue;'在樣式表中定位項目...向它添加一個類可能 –

+0

嘗試此操作----背景顏色:藍色 –

+0

可能重複[如何用外部CSS覆蓋內聯樣式?](http :// stackoverflow.com/questions/16813220/how-can-i-override-inline-styles-with-external-css) –

回答

1

您可以在CSS屬性的末尾添加!important

background:blue !important; 

重要將避免所有級聯CSS

+0

還沒有壓倒顏色? – BarclayVision