How to use variable in CSS? [duplicate]
Possible Duplicate:开发者_JAVA技巧
Create a variable in .CSS file for use within that .CSS file
I heard about that we can declare/define variable in CSS and use them like global variables like this:
@nice-blue: #5B83AD;
#header { color: @nice-blue; }
So anyone knows how to use them?
For that you need to use Less or Sass which are CSS Dynamic languages.
here's some comparison between both technologies.
You need to use something like SASS
http://sass-lang.com/#variables
or Less
http://lesscss.org/
There is a language written on top of CSS which make use of variables like you asked, it's called LessCSS
精彩评论