你好,这个需要使用媒体查询来实现。
.gridContainer {
margin-left: auto
margin-right: auto
width: 86.45%
}
.img { width:50%}
@media only screen and (min-width: 481px) {
.gridContainer {
width: 90.675%
padding-left: 1.1625%
padding-right: 1.1625%
}
.img { width:60%}
}
@media only screen and (min-width: 769px) {
gridContainer {
width: 88.5%
max-width: 1232px
}
.img { width:80%}
}