HTML文档或CSS树的深度有多大? [英] Is there a limit to how deep an HTML document or CSS tree can be?
本文介绍了HTML文档或CSS树的深度有多大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在想这个,因为我有一些非常深的HTML结构。我的观点是:
- 对HTML的嵌套层数有最大限制吗?
- 与CSS类似 - 我需要从HTML DOM树的叶节点中选择东西?
- 是否依赖于浏览器?
感谢您的帮助,
James
解决方案
XHTML 1.0 和 HTML 4.01 规范定义了嵌套限制。 HTML5尚未标准化,但工作规范未提及限制。
CSS 2 规范同样包含没有限制。
基于浏览器的限制可能是未来的一个问题,但我无法用现代浏览器找到任何问题报告。
I've been wondering this for a while, because I've got some pretty deep HTML structures going on. My points are these:
- Is there a maximum limit to the number of nesting levels for HTML?
- Likewise with CSS - I need to select stuff from the leaf nodes of the HTML DOM tree?
- Is it browser dependent?
Thanks for any help,
James
解决方案
Neither the XHTML 1.0 nor the HTML 4.01 specification defines a nesting limitation. HTML5 is not yet standardized, but the working spec does not reference a limitation.
The CSS 2 spec similarly contains no limit.
Browser-based limitations may be an issue in the future, but I was unable to find any problem reports with modern browsers.
这篇关于HTML文档或CSS树的深度有多大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文