2013-07-05 22 views
-1

重要的我想申請!important所有divpprespan元素,並覆蓋其目前正在編寫的內聯的所有屬性。例如:應用!到整個CSS佈局

.contpost p,pre,span,div{ 
    color:#4c4c4c !important; 
} 

這種顏色現在是否適用於整個頁面,特別是那個div

+1

歡迎所以。它不是很清楚你在這裏問什麼。身份證建議檢查這些鏈接,http://stackoverflow.com/help/how-to-ask,http://stackoverflow.com/help/asking – Blowsie

回答

3

也許你是指這個?沒有更多信息,它有點模糊。

.contpost p, 
.contpost pre, 
.contpost span, 
.contpost div{ 
    color:#4c4c4c!important; 
} 
0

你可以添加一個id body標籤,說

<body id="container"> 

然後用

#container div{color:value !important;} 
#container p{color:value !important;} 
#container pre{color:value !important;} 
#container span{color:value !important;} 

或只是將它們組合成一個:

#container div, #container p, #container pre, #container span{color:value !important;}