Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚发现使用<div />而不是<div></div>完全破坏了我在 IE8 中的页面。尽管我在一个地方只有空标记语法,但一半的页面甚至没有呈现。
<div />
<div></div>
这是 IE8 中的错误还是正确的标准实现?如果这是正确的行为并且微软故意如此严格,我感到很惊讶。
在 HTML 4 中,需要 Div 标签结束标签。
http://www.w3.org/TR/html401/struct/global.html#h-7.5.4
检查你的标准:)