<h3><img src="image.png" width="124" height="124" alt="" style="float: left;"/>This is a heading</h3>
This is text.
<ol>
<li>A list Item</a>
</li><li>Another list item</a>
</li><li><a href="http://www.facebook.com/TVN.cl">Another list item with a link</a>
</li>
</ol>
我有一个图像,我想浮动在一些文本内容的左边。我注意到有序和无序列表上的项目符号随浮动一起折叠,并且在图像中添加边距或填充不会增加任何效果。有没有什么干净的方法可以在保留默认编号和项目符号的同时保持列表边距?
发布于 2012-04-16 13:11:41
将float赋给你的OL或者你可以使用这个CSS:
ol {
margin:0 0 0 10px;
padding:0px;
float:left;
}
ol li a {
color:#000;
text-decoration:none;
}
https://stackoverflow.com/questions/10168186
复制相似问题