今天闲来无事,在www.jsfoot.com中看到一个星星评分的特效,所以就拿来用了用,效果还不错,不过还不能满足我的需求,所以自己稍作了修改。本人js技术是个菜鸟,很多我也不是很明白,所以解释的不是很详细,还请各位谅解哦。
首先请查看效果预览图:
点击“发表问题”前的界面效果:
点击“发表问题”后的界面效果:
大家可以明显的发现,点击“发表问题”后,会将评分结果和评分图片都显示出来,当然还有内容,不过本人没有写罢了。这就是我要的效果:把评分结果以及选中的评分图片、内容都显示出来。
所有的代码以及插件,请下载附件。
需要用的jquery插件:
css样式:
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
body{font:12px/180% Arial, Helvetica, sans-serif;}
/*quiz style*/
.quiz{border:solid 1px #ccc;height:270px;width:772px;}
.quiz h3{font-size:14px;line-height:35px;height:35px;border-bottom:solid 1px #e8e8e8;padding-left:20px;background:#f8f8f8;color:#666;position:relative;}
.quiz_content{padding-top:10px;padding-left:20px;position:relative;height:105px;}
.quiz_content .btm{border:none;width:100px;height:33px;url(p_w_picpaths /btn.gif) no-repeat;margin:10px 0 0 64px;display:inline;cursor:pointer;}
.quiz_content li.full-comment{position:relative;z-index:99;height:41px;}
.quiz_content li.cate_l{height:24px;line-height:24px;padding-bottom:10px;}
.quiz_content li.cate_l dl dt{float:left;}
.quiz_content li.cate_l dl dd{float:left;padding-right:15px;}
.quiz_content li.cate_l dl dd label{cursor:pointer;}
.quiz_content .l_text{height:120px;position:relative;padding-left:18px;}
.quiz_content .l_text .m_flo{float:left;width:47px;}
.quiz_content .l_text .text{width:634px;height:109px;border:solid 1px #c