1.css3 点击切换轮播图
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
label{
width: 20px;
height: 20px;
background-color: #FF0000;
margin-left: 10px;
float: left;
position: absolute;
}
.father{
width: 200px;
height: 100px;
background-color: #00FFFF;
position: relative;
overflow: hidden;
}
li{
list-style: none;
width: 200px;
height: 100px;
float: left;
text-align: center;
line-height:100px;
}
.i1{
background-color: #00FF7F;
}
.i2{
background-color: #ffff7f;
}
.i3{
background-color: #ff55ff;
}
ul{
width: 600px;
height: 100%;
margin: 0;
padding: 0;
transition: all 0.5s;
}
.label2{
left: 25px;
}
.label3{
left: 50px;
}
#input1:checked~ul{
margin-left: 0px;
}
#input2:checked~ul{
margin-left: -200px;
}
#input3:checked~ul{
margin-left: -400px;
}
</style>
</head>
<body>
<div class="father">
<input type="radio" name="si" id="input1" value="" hidden="" />
<label class="label1" for="input1">1</label>
<input type="radio" name="si" id="input2" value="" hidden="" />
<label class="label2" for="input2">2</label>
<input type="radio" name="si" id="input3" value="" hidden="" />
<label class="label3" for="input3">3</label>
<ul>
<li class="i1">第一页</li>
<li class="i2">第二页</li>
<li class="i3">第三页</li>
</ul>
</div>
</body>
</html>
图片效果