css 文字环绕图片

html-css05

css 文字环绕图片,第1张

给你的图片写上高度和宽度。

这个为什么我答不出来。不过你可以换个方法来实现。

把图片放在P的外面。或者把图片和文字看成二个DIV块。这样就可以轻松浮动了。不过有可能就是没有环绕效果。

按理说其它的人说的是正确的,而你还不能实现,应该把全部代码发上来看看,可能哪里有误吧。

亲,你尝试下这个代码:.cat-area{ width:343pxfloat:left}.cat-area .content .img{ margin-right:10pxfloat:leftdisplay:inline}.cat-area .content .title { float:leftcolor:#333font-size:14pxheight:100pxline-height:120pxoverflow:hidden}.cat-area .content .des{ float:leftcolor:#777font-size:12pxline-height:18px}

" width="70" height="70" />标题,,,,,摘要,,,,,

<style>

.content img {float:left}

</style>

<div class="content">

<img src="1.jpg" /><span>dsddsds<br>fdsfggfgfg<br>sfdsfdfdds</span>

</div>