如何使用HTML / CSS在图像周围包装文本 [英] How to wrap text around an image using HTML/CSS
本文介绍了如何使用HTML / CSS在图像周围包装文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想设计一个文字块,如下图所示:
(
I want to design a block of text like the following picture:
(https://docs.google.com/file/d/0B8gEuF9U3SaENzNsOTdxMmV3Ykk/edit?usp=sharing)
Question whether this is possible?
解决方案
you have to float
your image container as follows:
HTML
<div id="container">
<div id="floated">...some other random text</div>
...
some random text
...
</div>
CSS
#container{
width: 400px;
background: yellow;
}
#floated{
float: left;
width: 150px;
background: red;
}
FIDDLE
这篇关于如何使用HTML / CSS在图像周围包装文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文