English 中文(简体)
在显示: 无
原标题:workaround to read proper dimension when display : none

Are there any workarounds to read proper element dimensions when it s display value is set to none?

最好是在不改动<代码><>><>>>>>但<代码>>> 易读/代码> 的情况下加以隐瞒。 虽然它具有适当的层面,但内容影响到文件流通。

我认为,另一种方式是<代码>opacity,但随后浏览器支持基数。

在<代码>后添加了Im。

Oh Yess, I m 看着计算风格。 没有固定的CSS特性被设定为尺寸等。

任何其他解决办法?

最佳回答

(Thanks, @Pekka) 这方面的一个可能途径是确定<代码>的位置:绝对和<代码>ft:-999em。 这一要素仍然存在,以便你能够了解其层面,但是它赢得了文件中的 t,不应影响流动。

问题回答

这样做可以抵消。 Height and javascript

<script type="text/javascript">
<!--
onload=function() {

var divh = document.getElementById( top ).offsetHeight;

     alert(divh +"px");

 }
//-->
</script>




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签