如何定位背景影像
實(shí)例解析:
background-position屬性設(shè)定背景影像的起始位置。
基本語(yǔ)法: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%」。