我有这个div:
这是它的css:
.member {
width:200px;
clear:both;
position:absolute;
padding:5px;
}
当我在这个下面复制这个div时,由于位置:绝对,它们看起来是一个在另一个上面.
是否可以保持位置:绝对并且正常情况下让它们低于另一个?
谢谢,
最佳答案
Is it possible to keep the
position:absolute and have them one
below the other as normal?
简单回答:没有.
可能的解决方案:
>将top属性添加到成员类,并为每个成员递增
>不要使用绝对定位(在这种情况下可能最明智)
从您的代码段判断,您要创建成员列表.一个适合这种情况的简单模式就是UL(无序列表):
和相应的CSS一起去:
.memberlist li {
width: 200px;
padding: 5px;
margin-bottom: 10px;
}