我有以下代码样式链接:
.language_nav a:link, .language_nav a:visited, .language_nav a:hover,.language_nav a:active {
color: seagreen;
}
是否可以缩短它?
谢谢!
答案 0 :(得分:7)
答案 1 :(得分:3)
没有预处理器,例如SASS
或LESS
.language_nav a:link,
.language_nav a:visited,
.language_nav a:hover,
.language_nav a:active {
color: seagreen;
}
使用预处理器,例如SASS
或LESS
.language_nav a {
&:link,
&:visited,
&:hover,
&:active {
color: seagreen;
}
}