因此,可以说,我有一些文件CSS力格与绝对位置落后格与静态位置
#a{width: 10px; height: 10px; background: red; z-index: 10;}
#b{width: 100%; height: 100%; background: black; z-index: 5; position: absolute;}
<body>
<div id="a">foo</div>
<div id="b">bar</div>
<body>
的#b div
覆盖#a
,因为#b
有absolute
位置。
我怎样才能力#b
在#a
而不改变#a位置?
是的,我在发布问题后发现它,我的坏)谢谢 – Coffee
#a {width:10px; height:10px;背景:红色; z-index:10;位置:相对} –