zoukankan      html  css  js  c++  java
  • 迅雷影评效果

    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style>
       div,ul,li{margin:0;padding:0}
       ul,li{list-style:none}
       .comment p{border:1px solid #ccc;width:100px;clear:both;text-align:center;display:none}
       .comment li{float:left;width:22px;height:21px;background:url(sprite.png) no-repeat -24px 0;}
       .comment li.active{background:url(sprite.png) no-repeat}
    </style>
    <script>
    window.onload=function(){
          var odiv = document.getElementById('comment');
          var oli = odiv.getElementsByTagName('li');
          var op = odiv.getElementsByTagName('p')[0];
          var atemp =['很差','比较差','一般','挺好','非常好']
          //alert('test')
          for(var i =0;i< oli.length;i++){
              oli[i].index = i
              oli[i].onmouseover = function(){
                 for(i=0;i<=this.index;i++){
                     oli[i].className = 'active'        
                 }
                 op.style.display ='block';
                 op.innerHTML =atemp[this.index]
               }
              oli[i].onmouseout = function(){
                 for(i=0;i<=this.index;i++){
                     oli[i].className = ''        
                 }
                 op.style.display ='none';
               }
              oli[i].onclick = function(){
                 alert('您已评了'+(this.index+1)+'分')      
              }
          }
      }
    </script>
    </head>

    <body>
    <div id="comment" class="comment">
          <ul>
              <li></li>
              <li></li>
              <li></li>
              <li></li>
              <li></li>
          </ul>
          <p>推荐</p>
    </div>
    </body>
    </html>
     




    附件列表

    • 相关阅读:
      ffmpeg rtmp推流 视频转码
      java日志发展史 log4j slf4j log4j2 jul jcl 日志和各种桥接包的关系
      nginx stream 流转发,可以转发rtmp、mysql访问流,转发rtmp、jdbc请求
      java web http 转https 通过nginx代理访问
      linux 服务器磁盘挂载
      novnc 通过websockify代理 配置多点访问
      linux 文件服务 minio 安装部署配置
      AOP实现原理,手写aop
      java 泛型
      JAVA反射getGenericSuperclass()用法
    • 原文地址:https://www.cnblogs.com/zjx2011/p/0a39cb3fd785ee7c3fdc9d0f7f617078.html
    Copyright © 2011-2022 走看看