gpt4 book ai didi

html - 将文本环绕在一个 div 周围

转载 作者:太空宇宙 更新时间:2023-11-03 20:52:44 27 4
gpt4 key购买 nike

如何让 div 2 环绕 div 1 ?

(两个 div 都包含文本)

+---++------------------+
| || |
| 1 || |
| || 2 |
+---+| |
+---- |
| |
+-----------------------

最佳答案

float 1:Demo

CSS:

#d1 {
float: left;
}

HTML:

<div id="d1">Hello world. Hello world. Hello world. </div>
<div id="d2">
Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing. Testing.
</div>

关于html - 将文本环绕在一个 div 周围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14116266/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com