本文实例为大家分享了js实现简单图片轮播的具体代码,最终实现效果图
代码块
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。
* {
margin: 0;
padding: 0
}
ul {
list-style: none
}
img {
vertical-align: top
}
.box {
width: 490px;
height: 170px;
margin: 100px auto;
padding: 5px;
border: 1px solid #ccc;
}
.inner {
width: 490px;
height: 170px;
background-color: pink;
overflow: hidden;
position: relative;
}
.inner ul {
width: 1000%;
position: absolute;
top: 0;
left: 0;
}
.inner li {
float: left;
}
.square {
position: absolute;
right: 10px;
bottom: 10px;
}
.square span {
display: inline-block;
width: 16px;
height: 16px;
background-color: #fff;
text-align: center;
line-height: 16px;
cursor: pointer;
}
.square span.current {
background-color: orangered;
color: #fff;
}
1
2
3
4
5
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



