CSS 验证器说我对 text-wrap:suppress 的使用无效

发布于 2024-09-13 05:07:39 字数 488 浏览 5 评论 0原文

我正在使用 W3C CSS 验证器,它说我的以下代码有错误:

属性 text-wrap 不存在: 压制压制

.fieldLabelRed {
   padding: 0px 2px 0px 2px;
   margin: 0px 10px 0px 0px;
   color: #FF0000;
   text-wrap: suppress; /* <--- This line */
}

我看过CSS手册,这就是我发现的,但我没有看到任何错误: 文本换行设置:'text-wrap' 属性

我已经使用 CSS 2.1 和 3.0 进行了验证,并且都给出了相同的错误。

I am using the W3C CSS Validator and it says that I have an error with the following code:

Property text-wrap doesn't exist :
suppress suppress

.fieldLabelRed {
   padding: 0px 2px 0px 2px;
   margin: 0px 10px 0px 0px;
   color: #FF0000;
   text-wrap: suppress; /* <--- This line */
}

I have looked at the CSS manual, and this is what I've found, but I don't see anything wrong: Text Wrap Settings: the 'text-wrap' property

I have validated using CSS 2.1 as well as 3.0 and both give the same error.

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

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

发布评论

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

评论(3

梦中楼上月下 2024-09-20 05:07:39

我会尝试使用 white-space:nowrap; 来代替。我相信验证正确,但还没有尝试过。

I'd try white-space:nowrap; instead. I believe that validates correctly, but haven't tried it.

荒芜了季节 2024-09-20 05:07:39

这肯定是 CSS 验证器中的错误。但是,只要 CSS 有效,它是否验证是否重要?

This must be a bug in the CSS validator. However, does it matter whether or not the CSS validates as long as it's working?

无戏配角 2024-09-20 05:07:39

或者,尝试使用 webdesignerwall.com 上的这篇文章中描述的 word-wrap:break-word,该文章对我来说已经派上用场了好几次。

http://www.webdesignerwall.com/tutorials/word -wrap-force-text-to-wrap/

Or, try word-wrap: break-word as described in this article from webdesignerwall.com which has come in handy for me several times.

http://www.webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap/

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