CSS 验证器说我对 text-wrap:suppress 的使用无效
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我会尝试使用
white-space:nowrap;
来代替。我相信验证正确,但还没有尝试过。I'd try
white-space:nowrap;
instead. I believe that validates correctly, but haven't tried it.这肯定是 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?
或者,尝试使用 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/