[英]ul with background image and left floated li items
I have a ul
list with background image 我有一张带有背景图片的
ul
清单
ul {
margin: 0;
padding: 0;
list-style: none;
background: url("../images/columns_sep_thumbs.png") repeat-y 50% 0;
}
With the following style for li
具有以下风格的
li
li {
float: left;
width: 220px;
margin: 0;
padding: 20px 15px;
list-style: none;
text-align: center;
}
the image disappears when li items float left, any suggestions? 当li物品向左浮动时,图像消失了,有什么建议吗?
<ul>
<li>
content1
</li>
<li>
content2
</li>
<li>
content3
</li>
</ul>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.