插件介绍:
名称:jquery.Score(网页评分插件)
版本:2.0
开发者:似懂非懂
基于插件:Jquery 1.3.0版本或以上
兼容:ie6、7、8、谷歌、火狐、360等各大主流浏览器
使用方法:
<script type="text/javascript">
$(function(){
$("#scoreValue").Score({
showBranch:5,//分数
icoBefore:"images/30-30-off.gif",//灰色的图片地址
icoAfter:"images/30-30-on.gif", //彩色的图片地址
showWidth:30, //子元素宽度
showHeight:30 //子元素高度
});
})
</script>
Html结构:
只需要一个表单即可,如下:
<input type="text" id="scoreValue" value="4" />
Css Style:
<style>
.scoreBox{ width:0px; height:10px; position:relative;}
.scoreBox ul,.scoreBox li{ padding:0px; margin:0px; list-style:none;}
.starBg{ width:0px; height:10px; position:relative; z-index:998; }
.maskBox{display:block; width:50px; height:10px; overflow:hidden; position:absolute; z-index:999; top:0px; left:0px; padding:0px; margin:0px;}
.maskBox li,.starBg li{display:block;width:5px; height:10px; overflow:hidden; float:left; cursor:pointer;}
</style>