简体   繁体   English

CSS3不起作用?

[英]css3 doesn't work?

I have this piece of html: 我有这段HT​​ML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  <head>
    <title>Minimal XHTML 1.1 Document</title>
    <style type="text/css">
        p.test {
            border: 1px solid #000000;
            white-space: nowrap;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    </style>
  </head>
  <body>
    <p class="test">This is a minimal <a href="http://www.w3.org/TR/xhtml11">XHTML 1.1</a> document.</p>
  </body>
</html>

But if I try to validate it here: http://jigsaw.w3.org/css-validator/#validate_by_input+with_options 但是,如果我尝试在此处进行验证: http : //jigsaw.w3.org/css-validator/#validate_by_input+with_options

I get the following error: 我收到以下错误:

p.test Parse Error [empty string] p.test解析错误[空字符串]

Validation has nothing to do with whether any particular property works in any browser. 验证与任何特定属性是否在任何浏览器中均可使用无关。 It only indicates whether the syntax and content follows the standard. 它仅指示语法和内容是否符合标准。 As this error states, it does not exist in CSS 2.1 but it does exist in CSS3. 正如此错误指出的那样,它在CSS 2.1中不存在,但在CSS3中确实存在。 You can select CSS3 from the "More Options" drop down box 您可以从“更多选项”下拉框中选择CSS3

It seems that the current version of the spec does NOT contain text-overflow. 似乎该规范的当前版本不包含文本溢出。

http://www.w3.org/TR/css3-text/ http://www.w3.org/TR/css3-text/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM