防止绝对定位的元素与文本重叠 [英] Prevent absolutely-positioned elements from overlapping with text

查看:680
本文介绍了防止绝对定位的元素与文本重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个独特的情况在这里。



基本上,我有一个绝对定位的文本块,由于设计的限制必须绝对定位。

我也有我的文本的其余部分,这是正常位置。但是,我需要防止我的正常文本与我的原始文本重叠。



这是否可以简单地使用HTML和内联CSS?我没有访问JavaScript或外部/ 相关的CSS;只有内联样式可用。我已使用 this jsFiddle 创建了我的CSS的简化版本。

解决方案

是一个解决方案来创建另一个div(div2)与绝对定位的div(div1)重叠,但它本身是不可见的?然后其余的文本将避免重叠div2 ...



草绘到这里: http://jsfiddle.net/VKYwD/8/



不完全清楚你的约束是什么。


I have a unique situation here.

Essentially, I have an absolutely positioned block of text, which must be absolutely positioned due to design limitations.

I also have the rest of my text, which is normally positioned. However, I need to prevent my normal text from overlapping with my original text.

Is this possible simply with HTML and inline CSS? I do not have access to JavaScript or external/head-related CSS; only inline styles are available. I have created a simplified version of my CSS with this jsFiddle.

解决方案

Is a solution to create another div (div2) that overlaps the absolutely positioned div (div1), but is itself invisible? Then the rest of the text would avoid overlapping div2...

Sketched this out here: http://jsfiddle.net/VKYwD/8/

Not entirely clear on what your constraints are though.

这篇关于防止绝对定位的元素与文本重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆