日期:2014-05-17 浏览次数:20696 次
#fixed { background-color:red; width:100px; height:100px; top:50px; right:20px; display:block; position:absolute; z-index:5; } #fixed .shadow{ position:absolute; top:2px; left:2px; display:block; width:101%; height:101%; background-color:#555; z-index:4; }
<div id="fixed"> <ul> <li>asfasfsd</li> </ul> <div class="shadow"></div> </div>
#fixed { width:100px; height:100px; top:50px; right:20px; position:absolute; } #fixed .shadow{ position:absolute; top:2px; left:2px; width:101%; height:101%; background-color:#555; z-index:-1; } #fixed ul { list-style: none; margin: 0px; padding: 0px; top:50px; right:20px; width: 100%; height: 100%; background-color: red; }