如何在IE8中隐藏自定义css溢出?

时间:2022-07-26 07:28:36

I have made a script that uses pure css to toggle image, image caption and text. When I run this in IE8 I can all of the elements at once. The scripting for this is quite extensive so out of convenience I have made this JSFiddle. I need to hide the cascade-overlay-content and have tried to use overflow:hidden; and adding it changed nothing as I am still able to see all elements after adding it everywhere.

我制作了一个脚本,使用纯css来切换图像、图像标题和文本。当我在IE8中运行它时,我可以同时运行所有的元素。为此编写的脚本非常广泛,因此出于方便,我制作了这个JSFiddle。我需要隐藏cascade-overlay内容,并尝试使用overflow:hidden;加上它并没有改变什么,因为我仍然可以看到所有的元素在添加之后。

1 个解决方案

#1


0  

Try to add { position: relative; } to the parent element. Sometimes it helps in old IE versions, especially IE7. Besides, make sure the parent has { overflow: hidden; }.

尝试添加{位置:相对;}到父元素。有时它在旧的IE版本中很有用,尤其是IE7。此外,确保父节点具有{overflow: hidden;}。

#1


0  

Try to add { position: relative; } to the parent element. Sometimes it helps in old IE versions, especially IE7. Besides, make sure the parent has { overflow: hidden; }.

尝试添加{位置:相对;}到父元素。有时它在旧的IE版本中很有用,尤其是IE7。此外,确保父节点具有{overflow: hidden;}。