【小技巧】div层的重叠,不是防止,而是专门做的重叠

it2022-05-05  66

< HTML > < HEAD > < STYLE  type ="text/css" > <!--.over         {        position :  absolute ;         top :  165px ;         left :  20px ;         z-index :  2 ;         background-color :  green         } .under          {         position :  absolute ;         top :  175px ;         left :  20px ;         z-index :  1 ;         background-color :  blue         } --> </ STYLE > </ HEAD > < BODY > < SPAN  class ="over" > 這段文字距離視窗左邊 20 點,上邊 165 點 </ SPAN >   < SPAN  class ="under" >  這段文字則是接在前一段文字之"下"注意到有些字被遮住了, 我們也可以改變讓這段文字壓在前一段文字之上, 技巧在於改變 z-index 的值 </ SPAN >   </ BODY >   </ HTML >  

转载于:https://www.cnblogs.com/OceanChen/archive/2009/03/21/1418442.html


最新回复(0)