一.CSS背景background图片 - TOP 1.背景图片语法background-image:url() 引入背景图片background-repeat:no-repeat 设置背景图片是否重复平铺background-position:left top 设置图片的css背景定位,left代表靠左,top代表靠上 简写背景图片语法:background:url(图片地址) no-repeat left top 2.背景图片设置Body{background:url(http://…
首先准备一张雪碧图,Like this 背景图片的定位方法有3种,比较常用的两种为 关键字:background-position: top left; (top/bottom/cennter/left/right) 像素:background-position: 水平移动px 垂直移动px; 关键词: 其中关键字方法background-position: top left 和left top效果是一样的.(注意:如果您仅规定了一个关键词,那么第二个值将是"center".) 关于像…