css

1.background-color:背景颜色

  例:h1 {background-color:#6495ed;}

2.background-image:背景图片图像

  例:h1{background-image:url('bgdesert.jpg');}

3.background-repeat:背景图像 - 水平或垂直平铺

  (1):repeat:默认。背景图像将在垂直方向和水平方向重复。

  (2):repeat-x:背景图像将在水平方向重复。

  (3):repeat-y:背景图像将在垂直方向重复。

  (4):no-repeat:背景图像将仅显示一次。

  (5):inherit:规定应该从父元素继承 background-repeat 属性的设置。

4.background-attachment:设置背景图像是否固定或者随着页面的其余部分滚动(,)

  (1):scroll:默认值。背景图像会随着页面其余部分的滚动而移动。

  (2):fixed:当页面的其余部分滚动时,背景图像不会移动。

  (3):inherit:规定应该从父元素继承 background-attachment 属性的设置

5.background-position:设置背景图像的起始位置

  (top,left,center,right,bottom)

原文地址:https://www.cnblogs.com/futao123/p/5956377.html