简体   繁体   English

JavaScript扩展div在IE中不起作用

[英]JavaScript expanding div doesn't work in IE

I have a script that lets you put a link at the bottom of some text so you can reveal more text. 我有一个脚本,可让您在某些文本的底部放置一个链接,以便您可以显示更多文本。 It works great in Firefox. 它在Firefox中效果很好。 When you click the link, the div appears and the other parent divs expand with the growing child div. 单击链接时,将显示div,其他父div随子div的增长而扩展。 But the parent divs don't expand in IE. 但是父div不会在IE中扩展。 The text actually disappears behind the row (this is in a table created with divs) below. 文本实际上消失在下面的行后面(在使用div创建的表中)。 I want it to push the next row down so that the rest of the text appears. 我希望它向下推下一行,以便显示其余文本。

Also, my images seem larger in IE than they are in Firefox. 另外,我的图像在IE中看起来比在Firefox中更大。 Can I scale the images a little bit with a conditional statement? 我可以使用条件语句稍微缩放图像吗? If so, how? 如果是这样,怎么办?

you have more than one problem, anyway images with fixed sizes should render the same across browsers. 您有多个问题,无论如何,固定大小的图片应在浏览器中呈现相同的效果。 For the first problem with the link you should post some code. 对于链接的第一个问题,您应该发布一些代码。 I suggest you to check if your script throws some errors in IE using the IE developer toolbar (bundled with IE8 or downlodable here from Microsoft ) 我建议您使用IE开发人员工具栏(与IE8捆绑在一起,或从Microsoft下载到此处 )检查脚本是否在IE中引发一些错误。

Have you considered using something like the JQuery Accordion ? 您是否考虑过使用诸如JQuery Accordion之类的东西? It's a quick way to accomplish something like you're going for, if I understand correctly. 如果我正确理解的话,这是完成您要完成的任务的快速方法。

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

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