Annotation of 2002/css-validator/manual.html.zh-cn, revision 1.20
1.20 ! ylafon 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
! 2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
! 3: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
! 4: <head>
! 5: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
! 6: <title>CSS验证器的用户手册</title>
! 7: <link rev="made" href="mailto:www-validator-css@w3.org" />
! 8: <link rev="start" href="./" title="Home Page" />
! 9: <style type="text/css" media="all">
! 10: @import "style/base.css";
! 11: @import "style/docs.css";
! 12: </style>
! 13: <meta name="revision"
! 14: content="$Id: manual.html.zh-cn,v 1.19 2009-03-25 20:13:53 ot Exp $" />
! 15: <!-- SSI Template Version: $Id: manual.html.zh-cn,v 1.19 2009-03-25 20:13:53 ot Exp $ -->
! 16: </head>
! 17:
! 18: <body>
! 19: <div id="banner">
! 20: <h1 id="title"><a href="http://www.w3.org/"><img alt="W3C" width="110" height="61" id="logo" src="./images/w3c.png" /></a>
! 21: <a href="./"><span>CSS Validation Service</span></a></h1>
! 22: <p id="tagline">
! 23: Check Cascading Style Sheets (CSS) and (X)HTML documents with style sheets
! 24: </p>
! 25: </div>
! 26:
! 27: <div id="main">
! 28: <!-- This DIV encapsulates everything in this page - necessary for the positioning -->
! 29:
! 30: <div class="doc">
! 31: <h2>CSS验证器的用户手册</h2>
! 32:
! 33: <h3 id="TableOfContents">目录</h3>
! 34:
! 35: <div id="toc">
! 36: <ul>
! 37: <li><a href="#use">如何使用CSS验证器</a>
! 38: <ul>
! 39: <li><a href="#url">V通过URL的Response来验证</a></li>
! 40: <li><a href="#fileupload">通过上传文件来验证</a></li>
! 41: <li><a href="#directinput">通过直接输入的内容来验证</a></li>
! 42: <li><a href="#basicvalidation">基本验证都作了什么工作?</a></li>
! 43: </ul>
! 44: </li>
! 45: <li><a href="#advanced">高级验证</a>
! 46: <ul>
! 47: <li><a href="#paramwarnings">警告</a></li>
! 48: <li><a href="#paramprofile">配置</a></li>
! 49: <li><a href="#parammedium">媒介</a></li>
! 50: </ul>
! 51: </li>
! 52: <li><a href="#expert">写给专家的话</a>
! 53: <ul>
! 54: <li><a href="#requestformat">验证请求的格式</a></li>
! 55: <li><a href="#api">CSS验证器的Web Service的API</a></li>
! 56: </ul>
! 57: </li>
! 58: </ul>
! 59: </div>
! 60:
! 61: <p id="skip"></p>
! 62:
! 63: <h3 id="use">如何使用CSS验证器</h3>
! 64:
! 65: <p>
! 66: 使用验证器来验证一个CSS文档最简单的方法就是用基本界面。这里你会发现3种不同的页面,对应有3种不同的界面:
! 67: </p>
! 68:
! 69: <h4 id="url">通过URL的Response来验证</h4>
! 70: <p>
! 71: 只需要指定一个你需要验证的文档的URL就可以验证该文档这个文档可以是HTML或者CSS文件
! 72: </p>
! 73: <img style="display: block; margin-left:auto; margin-right: auto;"
! 74: src="./images/uri_basic_zh.png" alt="Validation by URI form" />
! 75:
! 76: <h4 id="fileupload">通过上传文件来验证</h4>
! 77: <p>
! 78: 这个方法允许你上传然后验证你上传的文件。点击“浏览...”按钮,然后选择一个你的机器上的要进行验证的文件就可以进行验证
! 79: </p>
! 80: <img style="display: block; margin-left:auto; margin-right: auto;"
! 81: src="./images/file_upload_basic_zh.png"
! 82: alt="Validation by File Upload" />
! 83: <p>
! 84: 这种情况下,只允许使用CSS文档,也就是说,你不能上传HTML格式的文件。你还需要注意的一点是@import属性。只有当他们是一个明确的公开的URL的时候才会被验证(也就是说,不要使用相对路径)。
! 85: </p>
! 86:
! 87: <h4 id="directinput">通过直接输入的内容来验证</h4>
! 88: <p>
! 89: 这个方法目的是为了测试一段CSS的代码。你只需要在文本输入框中输入你的CSS代码就可以了。
! 90: </p>
! 91: <img style="display: block; margin-left:auto; margin-right: auto;"
! 92: src="./images/direct_input_basic_zh.png"
! 93: alt="Validation by direct input" />
! 94: <p>
! 95: 和上一种方法一样需要注意只能使用CSS的代码并且只能使用绝对的URL路径。这种方法在你的某一段CSS代码有问题希望得到解决的时候非常有用,也非常方便。在报告某个bug的时候也很简单,因为你可以将验证结果的URL给我们。
! 96: </p>
! 97:
! 98: <h4 id="basicvalidation">基本验证都作了什么工作?</h4>
! 99:
! 100: <p>
! 101: 当使用基本界面的时候,验证器会和<a href="http://www.w3.org/TR/CSS2">CSS2的标准(目前最新的标准)</a>进行比较,<br />你会看到一个XHTML格式的Error输出(不会包括警告)。
! 102: <br />
! 103: 媒介会设定到使用所有的设备媒介(对于媒介的描述请参考<a href="http://www.w3.org/TR/CSS2/media.html">
! 104: http://www.w3.org/TR/CSS2/media.html</a>)。
! 105: </p>
! 106:
! 107: <h3 id="advanced">高级验证</h3>
! 108:
! 109: <p>
! 110: 如果你需要一个更精确的验证,你可以使用高级验证界面,在高级验证界面中你可以设定三个参数,下面是对每个参数的简单说明。
! 111: </p>
! 112:
! 113: <h4 id="paramwarnings">Warnings</h4>
! 114:
! 115: <p>
! 116: 这个参数对控制CSS验证器的输出很有用。事实上,验证器能给出两种消息:错误和警告。错误是当被检查的CSS不符合CSS标准的要求的时候产生的,警告和错误不同,它不是说和标准不符合的问题,它们只是用来警告CSS的开发人员,某些CSS代码在不同的客户端上可能会有导致奇怪动作的危险。
! 117: </p>
! 118: <p>
! 119: 一个典型的警告就是使用了font-family的时候:如果你不是提供一个通用字体,你将会得到一个警告,告诉你应该在最后添加一个通用字体,否则某个客户端上可能不能识别你所设定的字体,从而转为该客户端的默认字体。而这样可能会导致一个很奇怪的显示内容。
! 120: </p>
! 121:
! 122: <h4 id="paramprofile">配置</h4>
! 123:
! 124: <p>
! 125: CSS验证器可以检查不同的CSS配置。所谓的配置列出了一系列某一个特定平台上的的特性。配置本身的定义可以参考
! 126: <a href="http://www.w3.org/Style/2004/css-charter-long.html#modules-and-profiles0">
! 127: CSS站点
! 128: </a>。默认的选择就是当前最常用的
! 129: <a href="http://www.w3.org/TR/CSS21">CSS 2.1标准</a>.
! 130: </p>
! 131:
! 132: <h4 id="parammedium">媒介</h4>
! 133:
! 134: <p>
! 135: 这个参数就等同于@media规则,适用于所有的文档。你可以在
! 136: <a href="http://www.w3.org/TR/CSS2/media.html">
! 137: http://www.w3.org/TR/CSS2/media.html
! 138: </a>找到更多的关于媒介的资料。
! 139: </p>
! 140:
! 141: <h3 id="expert">写给专家的话</h3>
! 142:
! 143: <h4 id="requestformat">验证请求的URL格式</h4>
! 144: <p>下面是某个发送给W3C的CSS验证服务器的URL请求中的参数列表</p>
! 145:
! 146: <p>如果你想使用W3C的公开验证服务器,使用下面的参数,连接在下面基本URI之后来组织一个URL:<br />
! 147: <kbd>http://jigsaw.w3.org/css-validator/validator</kbd><br />
! 148: (将地址替换成你自己的服务器地址也可以)。</p>
! 149:
! 150: <p><strong>注意</strong>: 如果你想这样在程序中调用验证器来验证一批文档,那么请一定在你的程序中设定每两次验证之间间隔
! 151: <strong>至少1秒</strong>。CSS验证服务是给所有人免费的服务,大家会感谢你对公共资源的尊重。</p>
! 152:
! 153: <table class="refdoc">
! 154: <tbody>
! 155: <tr>
! 156: <th>参数</th>
! 157: <th>说明</th>
! 158: <th>默认值</th>
! 159: </tr>
! 160: <tr>
! 161: <th>uri</th>
! 162: <td>等待被验证的文档的<acronym title="Universal Resource Locator">URL</acronym> 。CSS或者HTML都可以</td>
! 163: <td>没有。但是这个参数和下面的<code>text</code>参数,至少有一个不为空。</td>
! 164: </tr>
! 165: <tr>
! 166: <th>text</th>
! 167: <td>被验证的CSS代码片断,只允许CSS代码</td>
! 168: <td>没有。但是这个参数和上面的<code>uri</code>参数,至少有一个不为空。</td>
! 169: </tr>
! 170: <tr>
! 171: <th>usermedium</th>
! 172: <td>指定用于被验证的媒介(<a href="http://www.w3.org/TR/CSS2/media.html">medium</a>),例如<code>screen</code>,
! 173: <code>print</code>, <code>braille</code>...</td>
! 174: <td><code>all</code></td>
! 175: </tr>
! 176: <tr>
! 177: <th>output</th>
! 178: <td>设定验证器输出结果的格式。可能的格式有:
! 179: <code>text/html</code> and <code>html</code> (XHTML document,
! 180: Content-Type: text/html),
! 181: <code>application/xhtml+xml</code> and <code>xhtml</code> (XHTML
! 182: document, Content-Type: application/xhtml+xml),
! 183: <code>application/soap+xml</code> and <code>soap12</code> (SOAP 1.2
! 184: document, Content-Type: application/soap+xml),
! 185: <code>text/plain</code> and <code>text</code> (text document,
! 186: Content-Type: text/plain),
! 187: everything else (XHTML document, Content-Type: text/plain)
! 188: </td>
! 189: <td>html</td>
! 190: </tr>
! 191: <tr>
! 192: <th>profile</th>
! 193: <td>设定用于验证比较的标准CSS配置文件。可以是
! 194: <code>css1</code>, <code>css2</code>, <code>css21</code>,
! 195: <code>css3</code>, <code>svg</code>, <code>svgbasic</code>,
! 196: <code>svgtiny</code>, <code>mobile</code>, <code>atsc-tv</code>,
! 197: <code>tv</code> or <code>none</code></td>
! 198: <td>最新的W3C标准: CSS 2</td>
! 199: </tr>
! 200: <tr>
! 201: <th>lang</th>
! 202: <td>输出结果的语言,目前支持<code>en</code>,
! 203: <code>fr</code>, <code>it</code>, <code>ko</code>, <code>ja</code>, <code>es</code>,
! 204: <code>zh-cn</code>, <code>nl</code>, <code>de</code>.</td>
! 205: <td>English (<code>en</code>).</td>
! 206: </tr>
! 207: <tr>
! 208: <th>warning</th>
! 209: <td>警告的级别:<code>no</code> 表示没有警告, <code>0</code>
! 210: 精简的警告信息, <code>1</code>或者 <code>2</code> 详细警告信息
! 211: </td>
! 212: <td>2</td>
! 213: </tr>
! 214: </tbody>
! 215: </table>
! 216:
! 217: <h4 id="api">CSS验证器的Web Service API: SOAP 1.2 验证接口文档</h4>
! 218: <p>
! 219: 更多的技术帮助,特别是SOAP1.2的输出,以及所有可能调用验证的方法,请参考
! 220: <a href="./api.html">CSS 验证器 Web Service API</a>.
! 221: </p>
! 222:
! 223: </div>
! 224: </div>
! 225: <!-- End of "main" DIV. -->
! 226:
! 227: <ul class="navbar" id="menu">
! 228: <li><strong><a href="./" title="Home page for the W3C CSS Validation Service">首页</a></strong> <span class="hideme">|</span></li>
! 229: <li><a href="documentation.html" title="Documentation for the W3C CSS Validation Service">文档</a> <span class="hideme">|</span></li>
! 230: <li><a href="DOWNLOAD.html" title="Download the CSS validator">下载</a> <span class="hideme">|</span></li>
! 231: <li><a href="Email.html" title="How to provide feedback on this service">反馈</a> <span class="hideme">|</span></li>
! 232: <li><a href="thanks.html" title="Credits and Acknowlegments">创作者</a><span class="hideme">|</span></li>
! 233:
! 234: </ul>
! 235:
! 236: <ul id="lang_choice">
! 237:
! 238: <li><a href="manual.html.bg"
! 239: lang="bg"
! 240: xml:lang="bg"
! 241: hreflang="bg"
! 242: rel="alternate">Български</a></li>
! 243: <li><a href="manual.html.de"
! 244: lang="de"
! 245: xml:lang="de"
! 246: hreflang="de"
! 247: rel="alternate">Deutsch</a>
! 248: </li>
! 249:
! 250: <li><a href="manual.html.en"
! 251: lang="en"
! 252: xml:lang="en"
! 253: hreflang="en"
! 254: rel="alternate">English</a>
! 255: </li>
! 256:
! 257: <li><a href="manual.html.es"
! 258: lang="es"
! 259: xml:lang="es"
! 260: hreflang="es"
! 261: rel="alternate">Español</a>
! 262: </li>
! 263:
! 264: <li><a href="manual.html.fr"
! 265: lang="fr"
! 266: xml:lang="fr"
! 267: hreflang="fr"
! 268: rel="alternate">Français</a>
! 269: </li>
! 270:
! 271: <li><a href="manual.html.ko"
! 272: lang="ko"
! 273: xml:lang="ko"
! 274: hreflang="ko"
! 275: rel="alternate">한국어</a>
! 276: </li>
! 277:
! 278: <li><a href="manual.html.it"
! 279: lang="it"
! 280: xml:lang="it"
! 281: hreflang="it"
! 282: rel="alternate">Italiano</a>
! 283: </li>
! 284:
! 285: <li><a href="manual.html.nl"
! 286: lang="nl"
! 287: xml:lang="nl"
! 288: hreflang="nl"
! 289: rel="alternate">Nederlands</a>
! 290: </li>
! 291:
! 292: <li><a href="manual.html.ja"
! 293: lang="ja"
! 294: xml:lang="ja"
! 295: hreflang="ja"
! 296: rel="alternate">日本語</a>
! 297: </li>
! 298:
! 299: <li><a href="manual.html.pl-PL"
! 300: lang="pl-PL"
! 301: xml:lang="pl-PL"
! 302: hreflang="pl-PL"
! 303: rel="alternate">Polski</a>
! 304: </li>
! 305:
! 306: <li><a href="manual.html.pt-BR"
! 307: lang="pt-BR"
! 308: xml:lang="pt-BR"
! 309: hreflang="pt-BR"
! 310: rel="alternate">Português</a>
! 311: </li>
! 312:
! 313: <li><a href="manual.html.ru"
! 314: lang="ru"
! 315: xml:lang="ru"
! 316: hreflang="ru"
! 317: rel="alternate">Русский</a>
! 318: </li>
! 319:
! 320: <li><a href="manual.html.sv"
! 321: lang="sv"
! 322: xml:lang="sv"
! 323: hreflang="sv"
! 324: rel="alternate">Svenska</a>
! 325: </li>
! 326:
! 327: <li><a href="manual.html.zh-cn"
! 328: lang="zh-cn"
! 329: xml:lang="zh-cn"
! 330: hreflang="zh-cn"
! 331: rel="alternate">简体中文</a>
! 332: </li>
! 333: </ul>
! 334:
! 335:
! 336:
! 337:
! 338:
! 339:
! 340:
! 341: <div id="footer">
! 342: <p id="activity_logos">
! 343:
! 344: <a href="http://www.w3.org/QA/" title="W3C's Quality Assurance Activity, bringing you free Web quality tools and more"><img src="http://www.w3.org/QA/2002/12/qa-small.png" alt="QA" /></a><a href="http://www.w3.org/Style/CSS/learning" title="Learn more about Cascading Style Sheets"><img src="images/woolly-icon" alt="CSS" /></a>
! 345: </p>
! 346:
! 347: <p id="support_logo">
! 348: <a href="http://www.w3.org/QA/Tools/Donate">
! 349: <img src="http://www.w3.org/QA/Tools/I_heart_validator" alt="I heart Validator logo" title=" Validators Donation Program" />
! 350: </a>
! 351: </p>
! 352:
! 353: <p class="copyright">
! 354: <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1994-2009
! 355: <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>®
! 356:
! 357: (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
! 358: <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
! 359: <a href="http://www.keio.ac.jp/">Keio</a>),
! 360: All Rights Reserved.
! 361: W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">责任</a>,
! 362: <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">商标</a>,已运用
! 363: <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">文档授权</a>
! 364:
! 365: 和 <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">软件授权</a>
! 366:
! 367: 相关规则。你与本站的互动是符合我们的<a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">公开</a> 和
! 368: <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">会员</a> 隐私声明。
! 369: </p>
! 370:
! 371: </div>
! 372: </body>
! 373: </html>
! 374:
! 375:
! 376:
Webmaster