javascript chrome web 检查器中的黄色警告图标是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6981782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 22:34:48  来源:igfitidea点击:

what does the yellow color warning icon mean in the chrome web inspector?

javascripthtmlcssgoogle-chrome

提问by Pacerier

what does the yellow color warning icon in the chrome web inspector imply?

chrome web 检查器中的黄色警告图标意味着什么?

enter image description here

在此处输入图片说明

Everything is working fine and there doesn't seem to be any errors whatsoever though..

一切正常,但似乎没有任何错误。。

采纳答案by Gabriel Yarra

According to the Chrome Developer Tools documentation, a CSS warning icon means that Chrome doesn't understand the CSS rule. Chrome ignores these rules.

根据 Chrome 开发者工具文档,CSS 警告图标意味着 Chrome 不理解 CSS 规则。Chrome 会忽略这些规则。

http://code.google.com/chrome/devtools/docs/elements-styles.html#styles_view

http://code.google.com/chrome/devtools/docs/elements-styles.html#styles_view

This may mean there is a problem with your CSS, or it may perfectly fine and expected behavior.

这可能意味着您的 CSS 存在问题,或者它可能完全正常且符合预期行为。

In the common case where you include browser specific CSS that Chrome shouldignore, chrome will warn you about the rule, while other browsers will follow the rule. That's not the case with the example CSS presented in the question, which needs to be fixed.

在您包含 Chrome忽略的浏览器特定 CSS 的常见情况下,chrome 会警告您该规则,而其他浏览器将遵循该规则。问题中提供的示例 CSS 不是这种情况,需要修复。

回答by thirtydot

It means there is something wrong with the property or its value (or, that it's unrecognized).

这意味着该财产或其价值有问题(或者,它未被识别)。

border-top-color: rgba(0, 0, 0, 0.5)pxis clearly wrong - the pxshould not be there.

border-top-color: rgba(0, 0, 0, 0.5)px显然是错误的 - 不px应该在那里。

As another example, -moz-transitionwill trigger the same warning, because WebKit does not recognize it.

再举一个例子,-moz-transition会触发同样的警告,因为 WebKit 无法识别它。