如何定位背景圖像
實例解析:
background-position屬性設(shè)置背景圖像的起始位置。
基本語法:background-position:x y;
x:表示水平位置,y:表示垂直位置。x,y可以分別是:關(guān)鍵字(left、right、top、bottom、center)、%值(x% y%)、坐標(biāo)值(例:xpos ypos,)。
注:如果background-position屬性只指定了一個值,則其他值將會為“center”或者“50%”。
實例解析:
background-position屬性設(shè)置背景圖像的起始位置。
基本語法:background-position:x y;
x:表示水平位置,y:表示垂直位置。x,y可以分別是:關(guān)鍵字(left、right、top、bottom、center)、%值(x% y%)、坐標(biāo)值(例:xpos ypos,)。
注:如果background-position屬性只指定了一個值,則其他值將會為“center”或者“50%”。
看過本課程的同學(xué)也在學(xué)