zoukankan      html  css  js  c++  java
  • 图片轮播

     1 <!DOCTYPE html>
     2 <html xmlns="http://www.w3.org/1999/xhtml">
     3 <head>
     4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     5  <title></title>
     6  <style>
     7 
     8 
     9 
    10  </style>
    11 </head>
    12 <body> 
    13 <div id="feng" style="overflow: hidden;height:210px;210px; border:0px solid #dde5bc;">
    14 <div id=feng1>
    15 <ul class="topimg1">
    16 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li>
    17 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li>
    18 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li>
    19 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li>
    20 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li>
    21 </ul>
    22   </div>
    23 <div id=feng2></div>
    24 </div>
    25      <script>
    26 var speed=50
    27 var feng=document.getElementById("feng");
    28 var feng2=document.getElementById("feng2");
    29 var feng1=document.getElementById("feng1");
    30 feng2.innerHTML=feng1.innerHTML
    31 function Marquee(){
    32 if(feng2.offsetTop-feng.scrollTop<=0)
    33 feng.scrollTop-=feng1.offsetHeight
    34 else{
    35 feng.scrollTop++
    36 }
    37 }
    38 var MyMar=setInterval(Marquee,speed)
    39 feng.onmouseover=function() {clearInterval(MyMar)}
    40 feng.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
    41       </script> 
    42 </body>
    43 </html> 
  • 相关阅读:
    用Shell判断字符串包含关系
    shell命令调用http接口(curl方式)
    shell脚本实现发送信息到钉钉
    功能测试特殊字符处理总结
    Java_Swing实现小球沿正弦曲线运动的代码
    Python迁移MySQL数据到MongoDB脚本
    1. WP8.1学习笔记
    0. WP8.1学习笔记
    小练习--低仿系统计算器
    C#字符串题目
  • 原文地址:https://www.cnblogs.com/double405/p/5273289.html
Copyright © 2011-2022 走看看