很多人在以往的頁面制作中用valign:bottom實現底部對齊。
但是在xHTML中,CSS中沒有了這個就不知道如何是好,以下為解決方法:
css:
#box1
{
position : relative ;
background : red ;
height : 100px ;
width : 100px ;
}
#box2 {
position : absolute ;
background : #BBB ;
height : 20% ;
width : 100% ;
left : 0 ;
bottom : 0 ;
}
position : relative ;
background : red ;
height : 100px ;
width : 100px ;
}
#box2 {
position : absolute ;
background : #BBB ;
height : 20% ;
width : 100% ;
left : 0 ;
bottom : 0 ;
}
html:


