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.
我试图让右边的黑色方块覆盖一点大的白色方块,让白色方块成为“浮动:左边”几乎可以做到这一点,但白色方块覆盖了黑色方块。我该如何解决?
http://strange-coast.com/9thdawn/
如果将其添加到侧边栏 css,黑色方块将出现在顶部:
position: relative; /* div needs a position */
尝试这个:
<div id="sidebar" style="position:relative; z-index:1;">