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