2012-07-21 100 views

回答

0

CSS:

在最上面的圖像

#topimage{ 
    background-image:url('/images/image.png'); 
    background-position:0 0; 
    width:200px; 
    height:24px; 
} 

爲從頂部, 假定圖像的每個部分的高度的第二圖像是24像素..

#secondimage{ 

background-image:url('/images/image.png'); 
background-position:0 -24px; 
    //-24px means the picture is shifted up by 24px so 
    //that the second image from top is visible 
width:200px; 
height:24px; 
} 
相關問題