4 回答
TA贡献8条经验 获得超0个赞
格式:
.banner {
width: 100%;
overflow: hidden;
margin-bottom: 15px;
}
.banner_bar {
float: right;
position: relative;
overflow: hidden;
}
.imgBox {
position: absolute;
left: 0;
top: 0;
}
/*绝对定位必须设置X轴和Y轴*/
.imgBox li {
float: left;
}
.imgBox img {
display: block;
}
.imgNum {
position: absolute;
left: 0;
bottom: 12px;
width: 100%;
text-align: center;
}
.imgNum a {
width: 20px;
height: 5px;
display: inline-block;
background-color: #FFF;
overflow: hidden;
margin: 5px;
}
.imgNum .active {
background-color: #FF7100;
}
.banner_big,
.banner_big img {
width: 810px;
height: 347px;
}
.banner_big .imgBox {
width: 1620px;
height: 347px;
}
.banner_sm,
.banner_sm img {
width: 190px;
height: 400px;
}
.banner_sm .imgBox {
width: 380px;
height: 400px;
}
TA贡献8条经验 获得超0个赞
框架代码:
<div class="banner comWidth ">
<div class="banner_bar banner_big">
<ul class="imgBox">
<li>
<a href="#"><img src="img/banner/example1.gif" alt="banner"></a>
</li>
<li>
<a href="#"><img src="img/banner/example2.gif" alt="banner"></a>
</li>
</ul>
<div class="imgNum">
<a href="#" class="active"></a>
<a href="#"></a>
<a href="#"></a>
</div>
</div>
- 4 回答
- 0 关注
- 1933 浏览
相关问题推荐
添加回答
举报