我有一些非常简单的超文本标记语言和CSS:https://jsfiddle.net/79gdnyt1/8/
HTML
<div>
<img src="http://placehold.it/120x110">
<span>This text will wrap around the image.</span>
<span class="clear">This text isn't allowed to wrap around floated elements, and therefore will render underneath them.</span>
</div>
CSS
img {
float: right;
}
.clear {
clear: right;
}
为什么带有类clear
的元素没有显示在浮动图像的下面?
发布于 2018-07-22 01:42:32
在.clear
类中使用display: block
属性
https://stackoverflow.com/questions/51458568
复制相似问题