高分求css文字环绕图片代码

html-css010

高分求css文字环绕图片代码,第1张

<style>

.content img {float:left}

</style>

<div class="content">

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

</div>

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

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

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

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

<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>