如何定位背景圖像
實(shí)例解析:
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屬性只指定了一個(gè)值,則其他值將會(huì)為“center”或者“50%”。