[英]How do I get my text to flow with this <img> instead of waiting till it's clear? [HTML]
I'm trying to get the text to float around the little image on my web-page, and I've tried everything I can think of.我试图让文本漂浮在我网页上的小图像周围,我已经尝试了我能想到的一切。 I would embed the html and css here, but I had trouble doing it, sorry.我会在这里嵌入 html 和 css,但我在做这件事时遇到了麻烦,抱歉。
(I'll edit out the url when it's answered so I ain't using this as advertising.) [removed] (我会在 url 得到答复时将其编辑掉,因此我不会将其用作广告。) [已删除]
Basically, you've done it backwards.基本上,你已经倒退了。
Instead of having the image inline, and floating the p
's, float the image, leave the p
's inline.不是让图像内联并浮动p
,而是浮动图像,让p
内联。 Make sure the image still comes before the text though... Like this:确保图像仍然出现在文本之前......就像这样:
<img src="foo.png" style="float: left;">
<p>
this is some awesome text blah blah
</p>
You need to float the image left, not the paragraph.您需要将图像向左浮动,而不是段落。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.