【发布时间】:2011-10-14 06:15:14
【问题描述】:
我有:
.sketch_img_thumb_box .title{
opacity: 0.1;
}
.sketch_img_thumb_box:hover .title{
opacity: 1;
}
.sketch_img_thumb_box .artist{
opacity: 0.1;
}
.sketch_img_thumb_box:hover .artist{
opacity: 1;
}
.sketch_img_thumb_box .rating_bar {
opacity: 0.1;
}
.sketch_img_thumb_box:hover .rating_bar {
opacity: 1;
}
我把它归结为:
.sketch_img_thumb_box .title, .sketch_img_thumb_box .artist, .sketch_img_thumb_box .rating_bar{
opacity: 0.1;
}
.sketch_img_thumb_box:hover .title, .sketch_img_thumb_box:hover .artist, .sketch_img_thumb_box:hover .rating_bar{
opacity: 1;
}
我们可以进一步优化吗?
【问题讨论】:
-
向我们展示 html 以了解如何最好地解决这个问题...
标签: css optimization dry redundancy