请老师检查
来源:2-2 编程练习
慕瓜6072901
2020-07-26 11:41:11
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./swiper/idangerous.swiper2.7.6.css"/>
<title>Document</title>
<style type="text/css">
*{margin: 0;padding: 0;}
html,body,.swiper-container,.swiper-wrapper,.swiper-slide{width: 100%;height: 100%;}
.a{background: url(http://climg.mukewang.com/59f2f3c60001e51206000600.jpg);background-size: cover;}
.b{background: url(http://climg.mukewang.com/59f2f3dc0001512e06000533.jpg);background-size: cover;}
.c{background: url(http://climg.mukewang.com/59f2f3fb0001725305000707.jpg);background-size: cover;}
.pagination {
position: absolute;
z-index: 20;
bottom: 10px;
width: 100%;
text-align: center;
}
.swiper-pagination-switch {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 8px;
background: #555;
margin: 0 5px;
opacity: 0.8;
border: 1px solid #fff;
cursor: pointer;
}
.swiper-active-switch {
background: #fff;
}
</style>
</head>
<body>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide a"></div>
<div class="swiper-slide b"></div>
<div class="swiper-slide c"></div>
</div>
<div class="pagination"></div>
</div>
<script src="./swiper/idangerous.swiper2.7.6.min.js"></script>
<script type="text/javascript">
var swiper=new Swiper(".swiper-container",{
speed:500,
autoplay:2000,
loop:true,
autoplayDisableOnInteraction:false,
pagination : '.pagination'
});
</script>
</body>
</html>
1回答
好帮手慕言
2020-07-26
同学你好,效果是正确的,继续加油,祝学习愉快~
相似问题