2016-12-26 77 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