我正在尝试在网站中应用媒体查询,但我对这个主题的了解并不深,所以基本上我想在检测到的屏幕大于 1024*768 时将特定样式应用于标签。
这是我做的
@media screen and ( device-width: 1024px ) {
}
但我必须确定分辨率何时大于 1024
最佳答案
试试这个:
@media only screen and (min-width : 1025px) {
.classname {
/* styles here */
}
}
@media only screen and (max-width : 1024px) {
.classname {
/* other styles here */
}
}
关于css - 媒体查询 : Screen > 1024,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11975758/