html - 为什么<abbr>标签在不一样的浏览器里表现不一样?
天蓬老师
天蓬老师 2017-04-17 15:02:27
0
1
476

一个html文件,里面有用到<abbr>标签,就比如这个<abbr title="Document Object Model">DOM</abbr>

只有这个html文件,没加任何的CSS和JS代码。在Chrome和Safari中,和不加abbr一样的显示效果,但是鼠标悬停在关键词“DOM”上还是会显示注释。但是用Firefox打开就能发现有<abbr>包住的就有下划虚线。

为什么会有这种不一样呢?哪一种是以后的趋势?

下面是这个html文件的完整代码。是《JavaScript: DOM 编程艺术》里的。

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>Explaining the Document Object Model</title>
</head>

<body>
    <h1>What is Document Object Model?</h1>
    <p>
        The <abbr title="World Wide Web Consortium">W3C</abbr> defines the <abbr title="Document Object Model">DOM</abbr>        as:
    </p>
    <blockquote cite="http://www.w3.org/DOM/">
        <p>
            A plateform- and langage-neutral interface that will allow programs and scripts to dynamically access the update the content,
            structure and style of documents.
        </p>
    </blockquote>
    <p>
        It is an <abbr title="Application Programming Interface">API</abbr> that can be used to navigate <abbr title="HyperText Markup Language">HTML</abbr>        and <abbr title="eXtensible Markup Language">XML</abbr> documents.
    </p>
</body>

</html>

谢谢

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
PHPzhong

Not only the display of html tags is different, but also the default height and display of the same font size in each browser will be different

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!