我正在尝试根据不同的屏幕大小拥有三种不同的徽标尺寸(
small
,med
,big
)。以下是我的代码:@media screen and (max-width: 487px) {
.site-header .site-branding {
background-image: url("../images/logo_small.png") !important;
}
}
@media screen and (max-width: 1079px) {
.site-header .site-branding {
background-image: url("../images/logo_med.png") !important;
}
}
@media screen and (min-width: 1080px) {
.site-header .site-branding {
background-image: url("../images/logo_big.png") !important;
}
}
这个代码可以从big
切换到med
,但无法再从med
切换到small
。为什么?