我想要做的是在特定的 Y 位置有一个 div 元素,但浮动到左侧或右侧(以便页面上的其他文本将围绕它流动)。我似乎找不到正确的属性组合..
position:relative;float:right 有效,但 div 位于包含元素的顶部
position:relative;top:1in;float:right 将 div 向下移动,但文本流过的区域仍然在该区域的顶部,而不是 +1in 区域
position:absolute 完全禁用浮动
这是一个简单的例子:
<div style='position:relative;top:1in;float:right;border:0.1in solid;'>
<p>This is on the right</p>
</div>
<p>This is the text that should flow around the textbox. Make as long as needed...</p>
我真正想要的是区域,但还没有浏览器真正支持这一点。
有任何想法吗?谢谢..