首页 > 代码库 > [JavaScript] js 迅雷评分效果
[JavaScript] js 迅雷评分效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> <title>迅雷评分效果 - 豪情</title> <style type="text/css"> *{ margin:0; padding:0;} body{font:12px/1.125 Arial,Helvetica,sans-serif;background:#fff;} table{border-collapse:collapse;border-spacing:0;} li{list-style:none;} input[type="text"],input[type="password"],textarea{outline-style:none;-webkit-appearance:none;} textarea{resize:none} address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:normal;} legend{color:#000;} a{color:#0a8cd2;text-decoration:none;} a:hover{text-decoration:underline;} .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;} .clearfix{display:inline-block;} .clearfix{display:block;} .none{display:none} .demo{ position:relative; width:300px;margin:0 auto; padding-top:120px;} .list li{ float:left; width:16px; height:16px; margin-right:3px;cursor:pointer; display:inline; overflow:hidden; background:url(http://images.cnitblog.com/blog/100150/201304/02220917-50348f051a004a7385e4aaafcc3ce7a6.png) 0 -16px no-repeat;} .list li.cur{ background-position:0 0;} .score{ font-size:14px; color:#f60; padding:0 5px;} .text{ position:absolute; padding:3px 5px; left:135px;top:120px; border:1px solid #ccc;} </style></head><body><div id="demo" class="demo"> <ul class="list"> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> <p class="score"></p> <p class="text none">力荐</p></div><script type="text/javascript"> var oDemo = document.getElementById(‘demo‘); var oUl = oDemo.getElementsByTagName(‘ul‘)[0]; var oScore = oDemo.getElementsByTagName(‘p‘)[0]; var oP = oDemo.getElementsByTagName(‘p‘)[1]; var aLi = oUl.getElementsByTagName(‘li‘); var oLi = null; var aData = http://www.mamicode.com/[‘较差‘, ‘一般‘, ‘好看‘, ‘推荐‘, ‘力荐‘];>
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。