0
我有以下两个媒体查询如何模拟orientationchange获取css数据?
@media screen and (orientation : portrait) {
.rect {width:100px;}
}
@media screen and (orientation : landscape) {
.rect {width:200px;}
}
当我启动index.php
我需要两个变量即刻例如
var rect_portrait = width // when orientation is portrait (100 px)
var rect_landscape = width // when orientation is landscape (200 px)
如何实现?预先感谢您
landscape_width = portrait_height; landscape_height = portrait_width; – Andrew
安德鲁原谅我的低jQuery技能,但我怎样才能使用您提供的解决方案? –