css 文字环绕图片

html-css016

css 文字环绕图片,第1张

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

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

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

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

不知道你说的是不是这个

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <title>Document</title>

  <style type="text/css">

    .content{

      text-align: center

      margin:200px auto 0

      font-size: 50px

      color: #0B3BE4

      text-shadow: -5px -5px 2px red,-8px -8px 4px #3AF30B

    }

  </style>

</head>

<body>

    <div class="content">火焰字?</div>

</body>

</html>

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