<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>元宵节</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="css/swiper.min.css">
<script src="css/swiper.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
body {
font-family: "microsoft yahei";
}
.swiper-container {
width: 100%;
height: 100%;
background: #fff;
}
.swiper-slide {}
.swiper-slide {
width: 100%;
height: 100%;
background: url(upload/9.jpg) no-repeat left top;
/*每一页的背景图*/
background-size: 100% 100%;
}
/*img {
display: block;
}*/
/*.swiper-pagination-bullet {
width: 6px;
height: 6px;
background: #fff;
opacity: .4;
} 小点样式*/
/*.swiper-pagination-bullet-active {
opacity: 1;
}小点样式*/
@-webkit-keyframes tipmove {
0% {
bottom: 10px;
opacity: 0
}
50% {
bottom: 15px;
opacity: 1
}
100% {
bottom: 20px;
opacity: 0
}
}
.ani {
position: absolute;
}
.txt {
position: absolute;
}
#array {
position: absolute;
z-index: 999;
-webkit-animation: tipmove 1.5s infinite ease-in-out;
}
</style>
</head>
<body>
<div class="swiper-container swiper-container-vertical">
<div class="swiper-wrapper" style="transition-duration: 0ms; transform: translate3d(0px, 0px, 0px);">
<!-------------slide1----------------->
<section class="swiper-slide swiper-slide-active" style="height: 480px;">
</section>
<!---------------slide2-------------->
<section class="swiper-slide swiper-slide-next" style="height: 480px;">
</section>
<!----------------slide3-------------->
<section class="swiper-slide" style="height: 480px;">
</section>
<!-------------slide4----------------->
<section class="swiper-slide" style="height: 480px;">
</section>
</div>
<!--底部的三角-->
<img src="upload/web-swipe-tip.png" style="width:20px;height:15px; top:460px; left:150px;" id="array" class="resize">
</div>
<script>
scaleW = window.innerWidth / 320;
scaleH = window.innerHeight / 480;
var resizes = document.querySelectorAll('.resize');
for(var j = 0; j < resizes.length; j++) {
resizes[j].style.width = parseInt(resizes[j].style.width) * scaleW + 'px';
resizes[j].style.height = parseInt(resizes[j].style.height) * scaleH + 'px';
resizes[j].style.top = parseInt(resizes[j].style.top) * scaleH + 'px';
resizes[j].style.left = parseInt(resizes[j].style.left) * scaleW + 'px';
}
//底部三角的位置
var mySwiper = new Swiper('.swiper-container', {
direction: 'vertical',
mousewheel: true,//是否支持滚轮
on: {
init: function() {
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function() {
swiperAnimate(this);
}
}
})
</script>
</body>
</html>
swiper-上下滚动翻页
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 解决办法就是用 WKWebView 代替 UIWebView WKWebView在各个性能都要比UIWebV...
- 桌上摆着一堆东西,这本黑白两色封面设计的书——《隐形逻辑:教你快速切换思考方式》,以及与这本书相关的33张便签笔记...