css顺序 使用background问题
1.使用background简写属性,如果顺序在其他background-size属性之后,会覆盖之前的
2.背景图片使用background-image,不使用background简写
图片显示正常
background: url('https://xxx.png') no-repeat;
background-position: center center;
background-size: 100% 100%;
图片显示不正常
background-position: center center;
background-size: 100% 100%;
background: url('https://xxx.png') no-repeat; //这一句会覆盖之前的其它background属性

浙公网安备 33010602011771号