问题描述
我正在尝试在较新的浏览器中使用较旧的javascript(目前仅支持ie6).
i am trying to make a rather old javascript work in newer browsers(currently only supports ie6).
好吧,它不起作用了,到处都是 document.getElementById('idValue').style.pixelHeight = x
Well it isn't working and is littered withdocument.getElementById('idValue').style.pixelHeight = x
我之前从未见过这样的研究,所以我发现的所有内容都是2008年或更早的版本.那么HTML5仍然支持pixelHeight吗?(以及在Firefox和Chrome中)
i had never seen this before so did some research, and everything i found is dated 2008 and earlier.So is pixelHeight still supported in HTML5? (and in firefox and chrome)
Zenith说它在Firefox中不起作用,那么我应该如何以跨浏览器的方式来做到这一点?
Zenith said it won't work in firefox, so how should i be doing this in a cross browser way?
我们正在尝试制作一个可调整大小的用户面板,这样就可以了获取pixelHeight + = mouseMovement
we are trying to make a user resizeable panel so it was goingget pixelHeight += mouseMovement
但是当我第一次输入height ='auto'时,请多做一些研究,谢谢大家
but when i enter for the first time height = 'auto', off to do some more research, thanks guys
推荐答案
我用 clientHeight
.
并将 +"px"
添加到我的计算中.
and added + "px"
onto my calculations.
这似乎是我能得到的标准配置(好,它可以在Firefox,Chrome和IE10上使用完全不同的CSS3和基于网格的代码).
This seems as standard as I can get it (well, it works on Firefox, Chrome, and IE10 is using completely different code CSS3 and grid based).
这篇关于HTML5是否仍支持pixelHeight的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!