1.在背景上选用只有边框的星星做为背景
position: relative;//必须要有定位
height: 17px;
width: 30px;
background: url(../../../img/weike/start.png) no-repeat 0px 0px;
2.在里面的div用带颜色的星星做背景,覆盖在外面的div上,并且限制宽度,这样会有一部分的没有颜色的星星露在外面
position: absolute;
top: 0px;
left: 0px;
display: inline-block;
height: 17px;
background: url(../../../img/weike/start.png) no-repeat 0px -17px;
3.效果: