gpt4 book ai didi

javascript - 将文本环绕固定分隔线

转载 作者:行者123 更新时间:2023-11-27 22:35:19 24 4
gpt4 key购买 nike

有没有一种方法可以创建一个 html 元素,即使网页上的内容发生变化它也不会移动它保持在相同的位置并且其余内容环绕它?

我想创建一条横跨动态网页的长线。当有人向网页添加更多内容时,该行应保持完整,而不是像砖墙一样移动,其余内容围绕它移动或跳过它。

视觉示例:

content content content content content contentcontent content
content content content content content contentcontent content co
--------------------------------------------------------------------(long line)
ntent content contentcontent contentcontent contentcontent content
content contentcontent contentcontent contentcontent contentcontent

注意第 2 行文本如何绕过长行以在该行之后继续。

希望这是有道理的,

找到这个问题,这或多或少正是我想要的jQuery Split content based on height

虽然提问没有回答。

最佳答案

.fencepost {float: left; width: 0.1px; height: 100px;}
.gate {float: left; clear: left; width: 99.9%; height: 30px;}

http://jsfiddle.net/isherwood/P6Z3p/

关于javascript - 将文本环绕固定分隔线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14204136/

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