.slider {
width: 1224px;
height: 458px;
background-image: url(image/school/1.png);
background-size: cover;
background-repeat: round;
position: relative;
margin: auto;
transition: 1s;
/*隔1s换图*/
}
之前尝试过很多种方法,都是在网上找的,大部分都说把
background-size: contain;
background-repeat: no-repeat;
设置成这样,但是并不管用,设置成
background-size: cover;
background-repeat: round;
就可以满足铺满并且没有重复了。