/*图片可更改*/background-image:url(img/shoucang.png);
/*从父元素继承属性的设置*/background-repeat-x:inherit;
}.boxrepeat{
/*取消默认平铺*/background-repeat:no-repeat;
/*横向平铺*/background-repeat:repeat-x;
/*纵向平铺*/background-repeat:repeat-y;
}.boxsize{
/*背景图片的尺寸:px、百分比--依旧会默认平铺元素*/background-size:30px;background-size:50%;
/*图片的覆盖cover--等比放大覆盖整个元素*/background-size:cover;
/*背景图片的包含contain--在取消默认平铺的情况下,将图片等比放大直到图片的一边到达元素的边框*/background-repeat:no-repeat;background-size:contain;
}.boxattachment{
/*图片的固定--scroll:随着页面其余部分的的滚动而移动*/background-attachment:scroll;
/*图片的固定--fixed背景不会随着滚轮移动 但是元素会移动并且对图片进行一部分的覆盖*/background-attachment:fixed;
}.boxposition{
/*背景图片的定位--x:left y:top 位于左边顶部*/background-repeat:no-repeat;
/*background-position: left top;*/
/*背景图片的定位--x:25px y:50px 向右偏移25px 向下偏移50px*/background-position:25px 50px;background-position:right bottom;
/*背景图片的定位--center 居中*/background-position:center;
}