当前位置: 首页 > 工具软件 > Banner.js > 使用案例 >

jquery.banner.js图片更换

裴卓君
2023-12-01
<link href="./resources/css/jqBanner.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="./resources/js/jquery.js"></script>
<script type="text/javascript" src="./resources/js/jquery.banner.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#homeRotatingImage").qp_banner({banner_speed:2000,banner_int:1000,banner_async:false});
    })
</script>
</head>
<body>
     <div id="homeRotatingImage" class="s-skin-container s-isindex-wrap">
            <div class="s-skin-container s-isindex-wrap" style="background-size: cover;background-image: url('./resources/img/background2.jpg');">
            </div>
            <div class="s-skin-container s-isindex-wrap" style="background-size: cover;background-image: url('./resources/img/background1.jpg');">
            </div>
        </div>
</body>

jqBanner.css

.s-skin-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -10;
  background-position: center 0;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  -webkit-background-size: cover;
  -o-background-size: cover;
  zoom: 1;
  background-size: cover;
}
 类似资料: