This question already has answers here:
How to wrap text around an image using HTML/CSS
                                
                                    (4个答案)
                                
                        
                                4年前关闭。
            
                    
下面是我的代码。我希望将文字环绕图像。我使用了q {float: left; width: 100%}。但是,文本出现在图像下方。

<p class = "review">
  <img src="https://webster.cs.washington.edu/images/fresh.gif" alt="Fresh" />
  <q>TMNT is a fun, action-filled adventure that will satisfy longtime fans and generate a legion of new ones.</q>
</p>


还有其他方法可以将文字环绕图像吗?谢谢!

最佳答案

<p class = "review">
<img src="https://webster.cs.washington.edu/images/fresh.gif" alt="Fresh" style="float:left"/>
<q>TMNT is a fun, action-filled adventure that will satisfy longtime fans and generate a legion of new ones.</q>
</p>

关于html - 如何使用CSS将文字环绕在图片上,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29737437/

10-09 16:05