【发布时间】:2014-12-18 02:19:32
【问题描述】:
我想阻止文字环绕图像。不使用margin 有什么办法吗?
img {
margin-bottom: 2.5em;
}
<strong><img style="float: left;" src="https://www.google.com/images/srpr/logo11w.png" width="100" height="67" />Text here. Text here. Text here. Text here.
<br />Text here. Text here. Text here. Text here. Text here. Text here.
<br />Text here. Text here. Text here. Text here.Text here. Text here.Text here. Text here.Text here. Text here.Text here. Text here.
<br />Text here. Text here.Text here. Text here.Text here. Text here.
【问题讨论】:
-
不确定您的意思。您在图像上有一个
float: left;,这正是它所做的——让文本环绕它。你到底想完成什么? -
@TylerH jsfiddle.net/9rxtv9m9/5 当我不使用浮点数时会发生这种情况。我希望文本位于图像的右侧