W3C CSS Validator 如何识别 css3 文档?

发布于 2024-11-30 12:15:15 字数 243 浏览 1 评论 0原文

我有一个问题!

有没有办法为 W3C 验证器识别 css3 文件?

在 HTML5 中我们放置 但在 CSS 文件中我们可以放置什么?

当我验证我的 css 文件并且它包含一些 css3 元素(@font-facebox-shadow 等)时,它说它无效!因为它不知道它是 css3。那么……有什么方法吗?

非常感谢。达维德.

I'm having a issue!

Is there a way to identify a css3 file for the W3C validator?

In the HTML5 we put <!DOCTYPE html> but in a CSS file what can we put?

When I validate my css file and it contains some css3 elements (@font-face, box-shadow, etc), it says that it's not valid! 'cause it doesn't know it's css3. So... is there a method?

Thanks so much. Davide.

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

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

发布评论

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

评论(3

Saygoodbye 2024-12-07 12:15:15

不,CSS 文件没有自我识别功能。要针对特定​​版本的 CSS 验证文件,您必须明确选择所需的版本。在 W3C 验证器中,可以从“更多选项”下的“配置文件”菜单中进行选择。

CSS Level 3 已经存在,无论它的价值如何;在所有 CSS3 模块完成之前(不要屏住呼吸!),这到底意味着什么还有待商榷......

No, CSS files have no self-identification feature. To validate a file against a particular version of CSS, you have to explicitly choose what version you want. In the W3C Validator, this can be chosen from the “Profile” menu under “More options”.

CSS Level 3 is there, for what it's worth; until all CSS3 Modules are complete (don't hold your breath!) it's debatable what this really means...

荭秂 2024-12-07 12:15:15

James 代码损坏了,因为他没有将其包含在代码标签中,但这里是实际代码

http://jigsaw.w3.org/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=http%3A%2F%2Fwww.yourwebsitename.com%2F

。但是,这会破坏您的 W3C 标记验证。

cannot generate system identifier for general entity "usermedium"

…/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&la…

general entity "usermedium" not defined and no default entity

…/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&la…

reference not terminated by REFC delimiter

…ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=…

reference to external entity in attribute value

…ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=…

reference to entity "usermedium" for which no system identifier could be generated

…ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=…

cannot generate system identifier for general entity "warning"

…validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=http%…

我确实觉得很奇怪,W3C CSS 验证服务生成的代码破坏了 W3C 标记服务。哈哈,

所以选择你的毒药。我坚持使用 W3C 标记验证。 :)

James code broke because he didn't enclose it in code tags but here is the actual code

http://jigsaw.w3.org/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=http%3A%2F%2Fwww.yourwebsitename.com%2F

However, this will break your W3C Markup Validation.

cannot generate system identifier for general entity "usermedium"

…/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&la…

general entity "usermedium" not defined and no default entity

…/css-validator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&la…

reference not terminated by REFC delimiter

…ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=…

reference to external entity in attribute value

…ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=…

reference to entity "usermedium" for which no system identifier could be generated

…ator/validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=…

cannot generate system identifier for general entity "warning"

…validator?profile=css3&usermedium=all&warning=1&vextwarning=&lang=en&uri=http%…

I do find it strange that code generated by the W3C CSS validation service breaks the W3C Markup service. LOL

So pick your poison. I'm sticking with W3C Markup Validation. :)

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