现代化 - 如何

发布于 2024-11-18 18:32:04 字数 419 浏览 5 评论 0原文

嗨,我正在测试 Modernizr,这是我所做的代码,我无法在查看源代码中看到 html 标签中的样式,有人知道为什么吗???

<html class="no-js">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
<script type="text/javascript" src="http://www.modernizr.com/downloads/modernizr-latest.js"></script>
</head>
<body>content</body>

Hi I am testing modernizr and this is the code i did and i am not able to see the styles in the html tag in view source, does any one know why ???

<html class="no-js">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
<script type="text/javascript" src="http://www.modernizr.com/downloads/modernizr-latest.js"></script>
</head>
<body>content</body>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

在风中等你 2024-11-25 18:32:04

当您查看源代码时,您正在查看文件下载时的实际源代码,而不是在脚本执行之后(至少在现代浏览器中,我似乎记得IE6以某种方式显示基于实时的源代码) DOM)。

如果您使用 FireBug 之类的东西,您可以看到实时源代码,包括 html 上的类元素。

When you view source you are viewing the actual source code of the file as downloaded, not after the script has executed (at least in modern browsers, I seem to remember that IE6 somehow showed source based on the live DOM).

If you use something like FireBug you can see the live source, including the classes on the html element.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文