zoukankan      html  css  js  c++  java
  • jq广告无缝轮播实例

     代码如下 复制代码
    <html>
    <head>
    <metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/>
    <title>jquery广告无缝轮播代码演示</title>
     
    <styletype="text/css">
     li{
      list-style:none;
     }
     .mains{
      700px;
      margin:0 auto;
     }
     .mains .title{
      font-size:25px;
      padding:10px 0 5px 50px;
     }
     .g1{
      380px;
      height:180px;
     }
    </style>
    <scripttype="text/javascript"src="js/jquery.min.js"></script>
    </head>
    <body>
     <divclass="mains">
      <divclass="title">jquery广告无缝轮播代码演示</div>
      <divclass="g1"style="overflow: hidden;">
       <ulid="ulID"style="position: relative; height: 1800px; 380px; top: 0px;">
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/1.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/2.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/3.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/4.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/5.jpg"style=" 380px; height: 180px;"></li>
     
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/1.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/2.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/3.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/4.jpg"style=" 380px; height: 180px;"></li>
        <listyle=" 380px; height: 180px; float: left;">
         <imgsrc="img/5.jpg"style=" 380px; height: 180px;"></li>
       </ul>
      </div>
     </div>
     <scripttype="text/javascript">
      var PlaceTop = parseInt($("#ulID").css("top"));
      var int;
      function moveUL(){
       var ulID = $("#ulID");
       PlaceTop = --PlaceTop;
       if(PlaceTop == -900)
       {
        PlaceTop = 0;
       }
       ulID.css("top",PlaceTop);
       if(PlaceTop < -900){
        alert("Eror!");
        clearInterval(int);
       }
      }
      int=setInterval("moveUL()",10);
      $(".g1").hover(function(){
       clearInterval(int);
      },function(){
       int=setInterval("moveUL()",10);
      });
     </script>
    </body>
    </html>
  • 相关阅读:
    Java第十三天,内部类
    Java第十二天,权限修饰符
    Java面向对象基础
    opencv配置(win10+VS2015+opencv3.1)
    malloc函数
    C++用new创建对象和不用new创建对象的区别解析
    字符串匹配KMP算法中Next[]数组和Nextval[]数组求法
    C++将一个数组内容赋给另一个数组
    C++中的const和指针组合
    通过图片对比带给你不一样的KMP算法体验
  • 原文地址:https://www.cnblogs.com/aivnfjgj/p/7010212.html
Copyright © 2011-2022 走看看