我一直希望將兩種樣式結合在一起,以創建一個超級樣式,以便於使用和定製我的頁面。我可以將兩種以上的款式合併爲超級款式嗎?
是否可以定義類似這樣的東西? (如果是的話如何)
.bold { font-weight: bold;}
.color1 {color: white;}
.boldColor {.bold; .color1;}
where .boldColor is effectively
.boldColor {font-weight:bold; color:white;}
我想,這樣我可以有風格thoughout頁面,能夠很容易地改變顏色,很多地方在1處。我目前使用<p class="bold color">
但我的一些類DEFS的越來越長,所以我希望能夠使用<p class="boldColor">
感謝
和CleverCSS! http://sandbox.pocoo.org/clevercss – myfreeweb 2010-03-13 18:15:55
+1 lesscss可以做類似'.class {#id; }'。太好了! – 2010-03-13 18:17:02