Home >Web Front-end >HTML Tutorial >Ask a question about css under ie6! _html/css_WEB-ITnose
I would like to ask:
#name_a{.....;}li{....;}
#name_a{....;}#name_a li{.....;}
Isn’t the first one written separately? Well. . Just no line breaks. . What has changed is everything. . .
#name_a li{
and
li{
The range of selection is different
Both are ok, personal preference, you can use the entire css file without A branch is enough. Look at Jingdong’s css, which is densely packed. There are no branches.
.main{...}.menu{....}.top{...}
As above Writing will make the css file take up less space, but it will be difficult to read
.main{...}
.menu{....}
.top{...}
The css file written like this will be a little larger, but more organized