相关疑难解决方法(0)

如何在右下方的文本中包装文本?

每当我尝试在CSS中做一些看似简单的事情时,它都行不通.

我有一个包含460x160图像的内容div.我想要做的就是将图像放在右下角并将文本环绕在它周围.

<div id="contents">
    <img src="..." />
    text text text text text text ...
</div>
Run Code Online (Sandbox Code Playgroud)

所以我希望它看起来像:

------------------
| text text text |
| text text text |
| text text -----|
| text text |    |
------------------
Run Code Online (Sandbox Code Playgroud)

使用左上角或右上角图像进行操作是蛋糕:

#contents img { float:right; }

------------------
| text text |    |
| text text -----|
| text text text |
| text text text |
------------------
Run Code Online (Sandbox Code Playgroud)

现在我该怎么把它推到底部?到目前为止,我提出的最好的是:

#contents img { float:right; margin-top: 90%} // really needs to be 100%-160px

------------------
| text …
Run Code Online (Sandbox Code Playgroud)

html css css-float

57
推荐指数
3
解决办法
4万
查看次数

标签 统计

css ×1

css-float ×1

html ×1