Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下元素:
<div> <div class="top"> </div> <div class="content"> </div> </div>
我希望两个子 div 都是正确的并定位为绝对位置,以便它们覆盖其他元素。最好的方法是什么?
不是很清楚你想做什么,但如果你想要绝对定位在右边,这里有一个例子可以帮助你开始:
http://jsfiddle.net/b2yD9/
在两个 div 中添加 CSS
right:10px; and position:absolute