本文介绍了你如何修复在jQuery中使用slideToggle时出现的闪烁?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个简单的无序列表,我希望在点击时使用jQuery slideUp和slideDown效果显示和隐藏。一切似乎都运行正常,但是在IE6中,列表会向上滑动,闪烁一瞬间,然后消失。I have a simple unordered list that I want to show and hide on click using the jQuery slideUp and slideDown effect. Everything seems to work fine, however in IE6 the list will slide up, flicker for a split second, and then disappear.有没有人知道修复此问题?Does anyone know of a fix for this?谢谢!推荐答案为额外评论道歉(我可以' t upvote或评论Pavel的答案),但添加DOCTYPE为我解决了这个问题,并且slideUp / Down / Toggle效果现在可以在IE7中正常工作。Apologies for the extra comment (I can't upvote or comment on Pavel's answer), but adding a DOCTYPE fixed this issue for me, and the slideUp/Down/Toggle effects now work correctly in IE7.参见 A List Apart 有关DOCTYPES的更多信息,或者您可以尝试指定相当宽松的4 / Transitional:See A List Apart for more information on DOCTYPES, or you can try specifying the fairly lenient 4/Transitional:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> 这篇关于你如何修复在jQuery中使用slideToggle时出现的闪烁?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!