因此,可以說,我有一些文件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;位置:相對} –