aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/html/element/tt
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/element/tt
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/html/element/tt')
-rw-r--r--files/zh-cn/web/html/element/tt/index.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/tt/index.html b/files/zh-cn/web/html/element/tt/index.html
new file mode 100644
index 0000000000..4797e986a3
--- /dev/null
+++ b/files/zh-cn/web/html/element/tt/index.html
@@ -0,0 +1,52 @@
+---
+title: <tt>
+slug: Web/HTML/Element/tt
+translation_of: Web/HTML/Element/tt
+---
+<div>{{ obsolete_header() }}</div>
+
+<h2 id="概述">概述</h2>
+
+<p>HTML 电报文本元素 (<code>&lt;tt&gt;</code>) 产生一个内联元素,使用浏览器内置的 monotype 字体展示。这个元素用于给文本排版,使其等宽展示,就像电报那样。使用 {{ HTMLElement("code") }} 元素来展示等宽文本可能更加普遍。</p>
+
+<div class="note">这个元素已废弃。使用更加适当的元素,例如带有 <a href="/fr/docs/CSS" title="/fr/docs/CSS">CSS</a> 的 {{ HTMLElement("code") }} 或者 {{ HTMLElement("span") }} 来代替。</div>
+
+<h2 id="属性">属性</h2>
+
+<p>这个元素除了<a href="/en-US/docs/Web/HTML/global_attributes" title="HTML/global attributes">全局属性</a>之外,没有其它属性,所有元素都一样。</p>
+
+<h2 id="DOM_接口">DOM 接口</h2>
+
+<p>这个元素实现了 {{domxref('HTMLElement')}} 接口。</p>
+
+<div class="note">
+<p><strong>实现注解: </strong>Gecko 1.9.2(包含)之前, Firefox 为这个元素实现了 {{domxref('HTMLSpanElement')}} 接口。</p>
+</div>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush:html">&lt;p&gt;Enter the following at the telnet command prompt: &lt;code&gt;set localecho&lt;/code&gt;&lt;br /&gt;
+
+The telnet client should display: &lt;tt&gt;Local Echo is on&lt;/tt&gt;&lt;/p&gt;
+</pre>
+
+<h3 id="结果">结果</h3>
+
+<p>Enter the following at the telnet command prompt: <code>set localecho</code><br>
+ The telnet client should display: <code>Local Echo is on</code></p>
+
+<h2 id="Notes" name="Notes">注</h2>
+
+<ul>
+ <li>CSS 规范可以为 <code>tt</code> 选择器定义,来覆盖浏览器的默认字体。用于设置的偏好可能优先于指定的 CSS。</li>
+ <li>虽然这个元素没有在 HTML 4.01 规范中废弃,为了支持样式表,不建议使用它。</li>
+</ul>
+
+<h2 id="See_also" name="See_also">另见</h2>
+
+<ul>
+ <li>{{ HTMLElement("code") }}</li>
+ <li>HTML 4.01 规范:<a class="external" href="http://www.w3.org/TR/html4/present/graphics.html#h-15.2">字体样式</a></li>
+</ul>
+
+<div>{{ HTMLRef }}</div>