简体   繁体   English

Internet Explorer 7中的Fancybox / JQuery

[英]Fancybox/JQuery in Internet Explorer 7

We are using FancyBox 2.0/JQuery 1.7 in Internet Explorer 7 on http://www.tuxx.nl/spelling/werkwoorden/#print . 我们正在http://www.tuxx.nl/spelling/werkwoorden/#print的 Internet Explorer 7中使用FancyBox 2.0 / JQuery 1.7。 When you click the 'Feedback' button at the bottom, you will see a popup box with scrollbars in it. 当您单击底部的“反馈”按钮时,您将看到一个带有滚动条的弹出框。 How can we make it look like as it look like in Chrome? 我们如何使它看起来像Chrome中的样子?

Try set scrolling property to false. 尝试将scrolling属性设置为false。 I found a answered question like yours, check it out jQuery - Fancybox: But I don't want scrollbars! 我找到了一个像您一样的已回答问题,请查看jQuery-Fancybox:但我不需要滚动条!

Can be done in two steps: 可以分两步完成:
1) Set scrolling property to false 1) 将滚动属性设置为false
2) Add the following somewhere in your code, AFTER any CSS setting your .wrapper class 2)在任何CSS设置.wrapper类之后,将以下内容添加到代码中

<!--[if lt IE 8]>
<style type="text/css">#feedback_form .wrapper { height:362px; width:500px; }</style>
<![endif]-->

The way Fancybox sets the size of it's self according the the size of it's contents. Fancybox根据其内容的大小设置自身大小的方式。 In older versions of IE $().width() and height can return the wrong values, because it does not account for margin/padding, or some other reason. 在较旧版本的IE中, $().width()height可能返回错误的值,因为它没有考虑边距/填充或其他原因。 I use to know what the reason was, but I forgot. 我曾经知道原因是什么,但我忘了。 The main point is that it's broken in older IE's, so you need to set the width/height to something big enough for it to display right. 要点是它在较旧的IE中已损坏,因此您需要将width / height设置为足够大以使其正确显示。

You can test this with $('#feedback_form .wrapper').css({'height':'362px','width':'500px'}); 您可以使用$('#feedback_form .wrapper').css({'height':'362px','width':'500px'}); somewhere in Javascript, as a proof of concept. 在Javascript中的某个地方,作为概念证明。 I've personally tested it in IE9 compatibility mode, using the console before clicking the "feeback" button. 在单击“反馈”按钮之前,我已经使用控制台在IE9兼容模式下亲自对其进行了测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM