css怎么实现文字在图片四周环绕

html-css017

css怎么实现文字在图片四周环绕,第1张

<html>

<head>

<style type="text/css">

img

{

float:right

}

</style>

</head>

<body>

<p>在下面的段落中,我们添加了一个样式为 <b>float:right</b>的图像。结果是这个图像会浮动到段落的右侧。</p>

<p>

<img src="/i/eg_cute.gif" />

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

This is some text. This is some text. This is some text.

</p>

</body>

</html>

按照下面这种代码格式,就可以设置成你想要的效果,css根据需要设置段落格式,图片大小也可以通过里面的div设置

<div>

<div><img></div>文字

</div>

你到这个地址里去看看,上面有详细的介绍,这个目前还没有浏览器支持这个属性

http://www.w3cplus.com/css3/css-shapes-breaking-rectangular-design.html