background-size如何需要和background连用,那么background-position和background-size间需要用 字 符 ′ / ′ \color{red} {字符'/'} 字符′/′ 连接。
1)单个写法
.class1{
background-image: url("../../images/image.png");
background-repeat: no-repeat;
background-attachment: fixed; /*随文本滚动scroll*/
background-position: center center;
background-size: 100% 100%;
}
2)复合写法
.class2{
background: #CCC url("../../images/image.png") no-repeat fixed center center/100% 100%;
/*background: background-color background-image background-repeat background-attachment background-poisiton/background-size;*/
}