?
This document uses PHP Chinese website manual Release
已廢棄
此功能已過時。雖然它可能在某些瀏覽器中仍然有效,但由于可以在任何時候刪除它,所以不鼓勵使用它。盡量避免使用。
HTML 電報文本元素 (<tt>
) 產(chǎn)生一個內(nèi)聯(lián)元素,使用瀏覽器內(nèi)置的 monotype 字體展示。這個元素用于給文本排版,使其等寬展示,就像電報那樣。使用 <code>
元素來展示等寬文本可能更加普遍。
這個元素已廢棄。使用更加適當?shù)脑?,例如帶?nbsp;CSS 的<code>
或者<span>
來代替。
這個元素除了全局屬性之外,沒有其它屬性,所有元素都一樣。
這個元素實現(xiàn)了HTMLElement
接口。
實現(xiàn)注解: Gecko 1.9.2(包含)之前, Firefox 為這個元素實現(xiàn)了 HTMLSpanElement
接口。
<p>Enter the following at the telnet command prompt: <code>set localecho</code><br />The telnet client should display: <tt>Local Echo is on</tt></p>
在telnet命令提示符處輸入以下內(nèi)容: set localecho
telnet客戶端會顯示: Local Echo is on
CSS 規(guī)范可以為 tt
選擇器定義,來覆蓋瀏覽器的默認字體。用于設(shè)置的偏好可能優(yōu)先于指定的 CSS。
雖然這個元素沒有在 HTML 4.01 規(guī)范中廢棄,為了支持樣式表,不建議使用它。
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes)1 | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes)1 | (Yes) | (Yes) | (Yes) |