图片满屏伸展
2016-07-01 17:13
239 查看
满屏伸展
<div class="banner">
<ul class="slides">
<li style="width: 100%; float: left; margin-right: -100%; position: relative; display: block; z-index: 1; background: url(images/01_02.jpg) center center no-repeat;" class="">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1; background: url(images/01_02.jpg) center center no-repeat;" class="">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1; background: url(images/01_02.jpg) center center no-repeat;" class="">
</li>
</ul>
<ol class="flex-control-nav flex-control-paging"><li><a class="">1</a></li><li><a class="">2</a></li><li><a class="">3</a></li></ol>
</div>
.banner { height:397px; width:100%; position:relative;}
.slides { position: absolute; left:0px; right:0px; overflow: hidden;}
.slides li { height:397px; cursor: pointer; overflow: visible;}
.slides li a {
width: 100%;
height: 100%;
cursor: pointer;
}
.flex-control-nav {
position: absolute;
bottom: 10px;
z-index: 2;
width: 100%;
line-height: 30px;
text-align: center;
background: url(../images/ban_icohbg.png) no-repeat center center;
background-size: 12%;
}
.flex-control-nav li {
display: inline-block;
width: 20px;
height: 10px;
/* margin-right: 5px; */
zoom: 1;
}
.flex-control-nav a {
display: inline-block;
width: 20px;
height: 10px;
line-height: 40px;
overflow: hidden;
background: url(../images/ban_ico.png) center center no-repeat;
cursor: pointer;
}
DOM 结构
<div class="banner"><ul class="slides">
<li style="width: 100%; float: left; margin-right: -100%; position: relative; display: block; z-index: 1; background: url(images/01_02.jpg) center center no-repeat;" class="">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1; background: url(images/01_02.jpg) center center no-repeat;" class="">
</li>
<li style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1; background: url(images/01_02.jpg) center center no-repeat;" class="">
</li>
</ul>
<ol class="flex-control-nav flex-control-paging"><li><a class="">1</a></li><li><a class="">2</a></li><li><a class="">3</a></li></ol>
</div>
CSS 样式
.banner { height:397px; width:100%; position:relative;}.slides { position: absolute; left:0px; right:0px; overflow: hidden;}
.slides li { height:397px; cursor: pointer; overflow: visible;}
.slides li a {
width: 100%;
height: 100%;
cursor: pointer;
}
.flex-control-nav {
position: absolute;
bottom: 10px;
z-index: 2;
width: 100%;
line-height: 30px;
text-align: center;
background: url(../images/ban_icohbg.png) no-repeat center center;
background-size: 12%;
}
.flex-control-nav li {
display: inline-block;
width: 20px;
height: 10px;
/* margin-right: 5px; */
zoom: 1;
}
.flex-control-nav a {
display: inline-block;
width: 20px;
height: 10px;
line-height: 40px;
overflow: hidden;
background: url(../images/ban_ico.png) center center no-repeat;
cursor: pointer;
}
相关文章推荐
- shell输入显示带颜色字体的模块脚本
- Mybatis控制台打印Sql语句的实现代码
- 简单高效的代码部署方法
- 【杭电-oj】-1003-Max Sum
- hdu 4027
- 【linux学习笔记】Sublime Text3支持GB2312和GBK编码以及中文输入法
- 【linux学习笔记】Sublime Text3支持GB2312和GBK编码以及中文输入法
- Loadrunner做性能测试:为什么100个用户的响应时间反而比50个用户的响应时间更短?
- hdu 4027
- php.ini修改php上传文件大小限制的方法详解
- 142. Linked List Cycle II
- BSP-Apache HAMA-Graph运行(1)
- Thread多线程
- Android流量管理实时刷新流量数据
- centos 7,pip安装
- 6.3、Android Studio的CPU Monitor
- 6.3、Android Studio的CPU Monitor
- HashMap
- 继承、实现、依赖、关联、聚合、组合的联系与区别
- word2vec