zoukankan      html  css  js  c++  java
  • js轮换广告

     js轮换广告

    1.纵向轮换

    2.横向轮换  

    pptBox.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">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="pptBox.js"></script>
        <script type="text/javascript" src="jquery-1.7.min.js"></script>
      
        <title></title>
        <style type="text/css">
            .mainbox {
                overflow: hidden;
                position: relative;
            }
    
            .flashbox {
                overflow: hidden;
                position: relative;
            }
    
            .imagebox {
                text-align: right;
                position: relative;
                z-index: 999;
                right: 10px;
            }
    
            .bitdiv {
                display: inline-block;
                width: 7px;
                height: 7px;
                margin: 0 10px 10px 0px;
                cursor: pointer;
                float: right;
            }
    
            .defimg {
                background-image: url(http://img.51liucheng.com/u/mall/v3/02.png);
            }
    
            .curimg {
                background-image: url(http://img.51liucheng.com/u/mall/v3/01.png);
            }
        </style>
    </head>
    
    <body>
        <div>
            <script>
                var box = new PPTBox();
                box.width = 479; //宽度
                box.height = 305;//高度
                box.autoplayer = 6;//自动播放间隔时间
    
                //box.add({"url":"图片地址","title":"悬浮标题","href":"链接地址"})
                box.add({ "url": "http://img.51liucheng.com/u/mall/v3/%E4%B8%96%E7%95%8C%E6%9D%AF%E5%A4%A7%E4%BF%83.jpg", "href": "http://mall.51liucheng.com/ploy/2014sjb/index.html", "title": "" });
                //box.add({ "url": "http://img.51liucheng.com/u/mall/v3/gh02.jpg", "href": "http://mall.51liucheng.com/jydx2/jydx.html?mallIndexLogo1", "title": "" });
                box.add({ "url": "http://img.51liucheng.com/u/mall/v3/focus_4.jpg", "href": "", "title": "" });
                box.add({ "url": "http://img.51liucheng.com/u/mall/v3/focus_1.jpg", "href": "", "title": "" });
                box.add({ "url": "http://img.51liucheng.com/u/mall/v3/focus_3.jpg", "href": "", "title": "" });
                box.add({ "url": "http://img.51liucheng.com/u/mall/v3/focus_2.jpg", "href": "", "title": "" });
                box.show();
            </script>
        </div>
    </body>
    </html>
  • 相关阅读:
    前端项目升级和降级依赖的最佳姿势
    如果你github提交代码,报错remote: Support for password authentication was removed on August 13, 2021.
    js将连接符命名和驼峰命名互转
    滚动条常用样式
    计算该浏览器中滚动条的默认宽度
    解决webpack-dev-server启动后localhost:port可以访问,IP:port不能访问的问题
    获取滚动条宽度的方法
    mysql中的数据类型
    数据库和表的操作
    mysql插入,删除,修改记录
  • 原文地址:https://www.cnblogs.com/shushan/p/3795939.html
Copyright © 2011-2022 走看看