[英]Property screen.width with 2 screens (IE)
I use the javascript property screen.width to know which CSS to use... But with Internet explorer (both 7 and 8, I didn't tried on 9), the returned value is the one of my main screen (which is not the one I use...). 我使用javascript属性screen.width知道要使用的CSS ...但是使用Internet Explorer(7和8,我都没有尝试使用9),返回值是我的主屏幕之一(不是我用的那个...)。
Does anyone have a solution ? 有没有人有办法解决吗 ? Maybe another property ?
也许是其他财产? (I also tried with screen.availWidth, it didn't worked)
(我也尝试了screen.availWidth,它没有用)
Nicolas 尼古拉斯
Maybe you could use the window.innerWidth
property? 也许您可以使用
window.innerWidth
属性? Only downside is, it looks at the window
, not the screen
, which may not be what you want.. 唯一的缺点是,它看起来在
window
,而不是screen
,你想要什么这可能不是..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.