大家在浏览淘宝,京东等页面时,一定会发现它的轮播部分,把要宣传或者展示的内容用轮播的形式呈现给大家,本节呢,就把代码分享给大家,希望对大家有帮助。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.contain img {
width: 600px;
height: 350px;
}
.contain {
width: 3000px;
height: 350px;
white-space: nowrap;
font-size: 0;
position: absolute;
}
.wrapper {
width: 600px;
height: 350px;
overflow: hidden;
margin: 0 auto;
position: relative;
}
.spots {
position: absolute;
left: 225px;
bottom: 10px;
}
.spots span {
display: inline-block;
width: 10px;
height: 10px;
border: 3px solid white;
border-radius: 50%;
margin-right: 10px;
}
a {
text-decoration: none;
color: dimgrey;
font-size: 38px;
position: absolute;
top: 130px;
}
a:nth-