公共相册
最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
css div 实现图片从左向右自动横向排列
时间:2009-06-19 编辑:简简单单 来源:一聚教程网
我们先来看看效果图片再一步步分析实例代码了。
首先我们来看这一块代码。
http://111com.net/124461405936.jpg" alt="image" />
就这代码下面我们来看看css写法。
.gallery {
list-style: none;
margin: 0 0 0 10px;
padding: 0;
}
.gallery dl {
float:left;
overflow: hidden;
margin-top: 20px;
margin-right: 0;
margin-bottom: 0;
margin-left: 0px;
display: block;
padding: 10px;
}
.gallery dt {
padding: 0;
position: relative;
text-align: center;
margin-bottom: 8px;
}
.activityphotoinfo {
background:url(images/albumnameback.png) no-repeat top left;
text-align:center;
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
padding-top: 2px;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
}
.activityphotoinfo div{
position:relative;
}
.activityphotoinfo .text {
float: left;
padding-left: 40px;
}
.activityphotoinfo .text p {
display: block;
line-
}
div.poll {
display: block;
top: 0px;
right: 0px;
cursor:pointer;
}
div.poll a {
display: block;
cursor:pointer;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
}
.vote{
position:relative;
top:-20px;
left:60px;
display:block;
cursor:pointer;
margin:0 0 0 5px;
border:none;
background:none;
}
.gallery img {
background: #fff;
border: solid 1px #ccc;
padding: 4px;
}
.gallery span {
display: block;
position: absolute;
top: -12px;
left: 50px;
background: url(images/tape.png) no-repeat;
}
.gallery a {
text-decoration: none;
}
哈哈我们的css div 实例图片从左向右自动横向排列效果就出来了。原创转载注明www.111com.net/cssdiv/css.html
-
上一个: css pt,px区别是什么
-
下一个: css 定义png图片为透明背景
相关文章
- css expression 图片自动缩放 01-18
- css 图片自动缩放 10-23
- css+div 3行3列图片自动排列代码 10-31
- CSS 鼠标点击拖拽效果代码展示 10-31
- CSS使用SVG实现动态分布的圆环发散路径动画教程 10-31
- css3中仿放大镜效果的几种方式原理介绍 10-26