背景颜色
一般情况下元素背景颜色默认值是 transparent(透明),我们也可以手动指定背景颜色为透明色。
Background-color: transparent;
Background-color 属性定义了元素的背景颜色
background-color:颜色值;
背景图片
Background-image 属性描述了元素的背景图像。实际开发常见于 logo 或者一些装饰性的小图片或者是超大的背景图片, 优点是非常便于控制位置. (精灵图也是一种运用场景)
background-image : none | url (url)
背景图片后面的地址,千万不要忘记加 URL, 同时里面的路径不要加引号
背景平铺
background-repeat: repeat | no-repeat | repeat-x | repeat-y
背景图片位置
background-position: x y;
/* 背景位置 background-position: x y; */
/* center top 和 top center 一样 */
/* background-position: center top; */
/* 只给定一个位置 另外的位置默认是center */
background-position: right;