css:控制背景图片移动 repeat

以上是repeat的用法

背影图片的左上角相对当前元素左上角的坐标。 

右为X轴正半轴, 下为Y轴正半轴 


当前元素左上角坐标为 0,0 

默认图片的左上角正对当前元素的左上角 

图片左移 10px; 


background:url(images/hh.gif) no-repeat -10px 0;}

图片上移 10px; 


background:url(images/hh.gif) no-repeat 0 -10px;}



图片右移 10px; 


background:url(images/hh.gif) no-repeat 10px 0;} 



css代码: background:url(images/hh.gif) no-repeat -10px -10px;} 

猜你喜欢

转载自blog.csdn.net/jy123_123/article/details/82902745
今日推荐