CSS 宽,高,背景设置

width 宽,height 高,background 背景;
背景色 background-color:颜色值--英文单词/十六进制/rgb;
背景图 background-image:url(‘图片路径’);
背景图平铺 background-repeat:no-repeat / repeat-x / repeat-y;
背景图定位 background-position:第一个x轴位置的值(left center right 30px) 第二个y轴位置的值(top center bottom 60px)

复合写法:background : color image position repeat;

背景图滚动 background-attachment:fixed;
背景图尺寸 background-size:第一个x轴比例的值 第二个y轴比例的值;【CSS3的样式不兼容】

原文地址:https://www.cnblogs.com/davis16/p/8315686.html