7
18
2009
1

jQuery hide() 闪烁的问题

在用 jQuery 写页面的时候,碰到了一个郁闷的问题 ,

动画效果 hide() 在 firefox 下效果正常,在 IE 下当 hide 结束的时候 被隐藏的 DIV 往往会闪一下才完全消失

经过 google,终于在 jQuery 中文社区 找到解决方法

这是 DTD 定义不对,在 HTML 文档最前加入定义: 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 即可解决问题。

挖掘一下 >>

什么是 DTD?

Document Type Definition 位于文档开头,指定了浏览器该用什么规则来解析 HTML。

 

PS:

jQuery 用的是 xhtml 1.0 Transitional。

相对于一般的 HTML 语法上要严格一些,比如属性必须加引号,css数值必须跟单位 等。。

 

 

Category: Javascript | Tags: javascript jquery DTD | Read Count: 6178
cleaning services 说:
2021年10月01日 18:10

Various companies don't like to take time to hire unique employees or help with the effort to stay in a janitorial office staff. This will do take a handsome profit due with the need designed for specialized machines needed for situations enjoy floor buffing designed for wax floorboards. It is more sensible for a good number of companies to hire outside internet business cleaning expertise. if you are anticipating contracting a pro cleaner and company for one's facilities, make sure you get just a few estimates. Talk to a couple of different contractors before you'll make your concluding decision. This will be sure you are qualifing for the best price for one's business' must have. You might appreciate to fully understand you compared the costs and services to a few distinctive companies before making a choice.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com