码迷,mamicode.com
首页 > Web开发 > 详细

js轮换广告

时间:2014-06-20 22:20:57      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   java   http   

 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>

?

 

 

js轮换广告,布布扣,bubuko.com

js轮换广告

标签:style   class   blog   code   java   http   

原文地址:http://www.cnblogs.com/shushan/p/3795939.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!