这些CSS规则起作用了,但是哦,它们有很多重复的行,我该如何最小化呢?我尝试使用一些网站来缩小它,但我认为人类可以做得更好。请给我展示示例,谢谢。
HTML示例(各个区域更改并且全部看起来像这样)
<span class="term-links">Region: <a href="/region/japan/"><span class="japan">Japan</span></a></span>
CSS
.term-links .usa {
display: inline-block;
width: 16px;
height: 11px;
background: url('/img/usa.gif');
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
.term-links .japan {
display: inline-block;
width: 16px;
height: 11px;
background: url('/img/japan.gif');
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
.term-links .europe {
display: inline-block;
width: 16px;
height: 11px;
background: url('/img/europe.gif');
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
.term-links .korea {
display: inline-block;
width: 16px;
height: 11px;
background: url('/img/korea.gif');
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
.term-links .china {
display: inline-block;
width: 16px;
height: 11px;
background: url('/img/china.gif');
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
.term-links span
匹配的内容 - Owen