一个html文件,里面有用到标签,就比如这个DOM。
只有这个html文件,没加任何的CSS和JS代码。在Chrome和Safari中,和不加abbr一样的显示效果,但是鼠标悬停在关键词“DOM”上还是会显示注释。但是用Firefox打开就能发现有包住的就有下划虚线。
为什么会有这种不一样呢?哪一种是以后的趋势?
下面是这个html文件的完整代码。是《JavaScript: DOM 编程艺术》里的。
Explaining the Document Object Model
What is Document Object Model?
The W3C defines the DOM as:
A plateform- and langage-neutral interface that will allow programs and scripts to dynamically access the update the content,
structure and style of documents.
It is an API that can be used to navigate HTML and XML documents.
谢谢
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
何止html标签的显示不一样,连同一字体同一字号在各个浏览器里面的默认高度和显示都是会有差异的