【发布时间】:2014-08-15 14:21:47
【问题描述】:
我想做一个媒体查询:
only screen and either
(max-width: 64em) and (min-width: 24em)
or
(orientation: landscape)
在 JavaScript 表示法中,我想要的应该是这样的:
if ( screen === true && ( width > 24 && width < 64 ) || orientation === "landscape" )
我该怎么做?我可以使用括号吗?会不会:
<link
rel='stylesheet'
media='only screen and ( ((max-width: 64em) and (min-width: 24em)) or (orientation: landscape) )' href='style.css' />
这可能吗?
【问题讨论】:
标签: html css media-queries