不具有继承性
/*背景颜色*/
background-color:red;
/*背景图片*/
background-image:url(./1.png)
/*背景图片是否平铺*/
/*背景图片不平铺*/
background-repeat:no-repeat;
/*背景图片横向平铺*/
background-repeat:repeat-x;
/*背景图片竖向平铺*/
background-repeat:repeat-y;
/*背景图片的位置 */
background-position: x y ;
x为负数,背景图片水平向左移动,为正数,水平向右移动
y为负数,背景图片垂直向上移动,为正数,垂直向下移动
background-position: center center;
/* background-position: 100px 50px; */
(top right left bottom center)
/* 背景图片的尺寸
(cover 把图片自动填充满整合标签)*/
/* background-size: 100% 100%; */
/* contain 这个属性由原图片的尺寸(宽度 * 高度)来决定。
如果宽度大于高度 就是以横向填充标签(水平方向)
如果高度大于宽度 就是以纵向填充标签(垂直方向)
*/
background-size: contain;