diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/element/small | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/html/element/small')
-rw-r--r-- | files/zh-cn/web/html/element/small/index.html | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/small/index.html b/files/zh-cn/web/html/element/small/index.html new file mode 100644 index 0000000000..5c661cf515 --- /dev/null +++ b/files/zh-cn/web/html/element/small/index.html @@ -0,0 +1,119 @@ +--- +title: <small> +slug: Web/HTML/Element/small +tags: + - HTML + - 元素 +translation_of: Web/HTML/Element/small +--- +<div>{{HTMLRef}}</div> + +<p>HTML 中的<small>元素將使文本的字体变小一号。(例如从大变成中等,从中等变成小,从小变成超小)。在HTML5中,除了它的样式含义,这个元素被重新定义为表示边注释和附属细则,包括版权和法律文本。</p> + +<div>{{EmbedInteractiveExample("pages/tabbed/small.html", "tabbed-shorter")}}</div> + +<p class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples </a> and send us a pull request.</p> + +<table> + <tbody> + <tr> + <th scope="row">内容分类</th> + <td><a href="https://developer.mozilla.org/en-US/docs/HTML/Content_categories#Flow_content">流式内容</a>, <a href="https://developer.mozilla.org/en-US/docs/HTML/Content_categories#Phrasing_content">短语内容</a></td> + </tr> + <tr> + <th scope="row">允许的内容</th> + <td><a href="https://developer.mozilla.org/en-US/docs/HTML/Content_categories#Phrasing_content">短语内容</a></td> + </tr> + <tr> + <th scope="row">标签省略</th> + <td>无,必须拥有起始和结束标签</td> + </tr> + <tr> + <th scope="row">允许的父元素</th> + <td>接受<a href="https://developer.mozilla.org/en-US/docs/HTML/Content_categories#Phrasing_content">短语内容</a>或者<a href="https://developer.mozilla.org/en-US/docs/HTML/Content_categories#Flow_content">流式内容</a>的任何元素。</td> + </tr> + <tr> + <th scope="row">允许的 ARIA 角色</th> + <td>任意</td> + </tr> + <tr> + <th scope="row">DOM 接口</th> + <td>{{domxref("HTMLElement")}}</td> + </tr> + </tbody> +</table> + +<h2 class="editable" id="属性">属性</h2> + +<p>这个元素只有全局属性。</p> + +<h2 id="DOM_Interface" name="DOM_Interface">DOM 接口</h2> + +<p>这个元素实现 {{domxref("HTMLElement")}}接口。</p> + +<div class="note"> +<p><strong>接口实现注解:</strong>直到 Gecko 1.9.2,Firefox 为这个元素实现了 {{domxref("HTMLSpanElement")}}接口。</p> +</div> + +<h2 id="Example_1" name="Example_1">例子</h2> + +<h3 id="例子1">例子1</h3> + +<pre class="brush: html"><p>This is the first sentence. <small>This whole sentence is in small letters.</small></p> +</pre> + +<h4 id="Result" name="Result">结果</h4> + +<p>This is the first sentence. <small>This whole sentence is in small letters.</small></p> + +<h3 id="Example_2" name="Example_2">例子2 (CSS 替代)</h3> + +<pre class="brush: html"><p>This is the first sentence. <span style="font-size:0.8em">This whole sentence is in small letters.</span></p> +</pre> + +<h4 id="Result_2" name="Result_2">结果 </h4> + +<p>This is the first sentence. <span style="font-size: 0.8em;">This whole sentence is in small letters.</span></p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">规范</th> + <th scope="col">状态</th> + <th scope="col">注释</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-small-element', '<small>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName('HTML4.01', '/present/graphics.html#edef-SMALL', '<small>')}}</td> + <td>{{Spec2('HTML4.01')}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Notes" name="Notes">注意事项</h2> + +<p>尽管<span style="font-family: Courier New;"> <small></span> 元素,<span style="font-family: Courier New;"><b> 元素</span>和 <span style="font-family: Courier New;"><i></span> 元素被认为违反了结构和样式分离的原则, 但是在HTML5中是允许使用这三个元素的. 读者应该自行判断使用 <small> 还是CSS。</p> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<p>{{Compat("html.elements.small")}}</p> + + + +<h2 id="See_also" name="See_also">另请参考</h2> + +<ul> + <li>{{ HTMLElement("b") }}</li> + <li>{{ HTMLElement("font") }}</li> + <li>{{ HTMLElement("style") }}</li> + <li>HTML 4.01 规范: <a class="external" href="http://www.w3.org/TR/html4/present/graphics.html#h-15.2">字体样式</a></li> +</ul> |