怎样通过css的media属性,适配不同分辨率的终

2025-04-23 22:28:47
推荐回答(1个)
回答1:

@media screen and (max-width: 768px)and (min-width: 640px) {
    .test {
         width: 100px;
    }
}
@media screen and (max-width: 1024px)and (min-width: 768px) {
    .test {
         width: 200px;
    }
}

这些都是基础用法了