根据preffferd css语法我正在应用媒体查询,它不会改变任何东西。这不会给我任何改变的输出。帮助!
/* Landscape */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: landscape) {
.someClass{
display: none;
}
}
答案 0 :(得分:1)
由于使用错误,因此不会为您提供输出。您希望将该属性与HTML选择器一起使用。
正确的语法:
/* Landscape */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: landscape) {
body {
display: none;
}
}

答案 1 :(得分:0)
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: landscape) {
*{ display: none; }
}
试试这个,你没有选择要隐藏的东西