aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/htmlbasefontelement/index.html
blob: e405c215bae7aefcecb8b2b8bbf741e6f52cfde5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: HTMLBaseFontElement
slug: Web/API/HTMLBaseFontElement
translation_of: Web/API/HTMLBaseFontElement
---
<div>{{APIRef("HTML DOM")}}{{obsolete_header}}</div>

<p>The <strong><code>HTMLBaseFontElement</code></strong> interface provides special properties (beyond the regular {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating {{HTMLElement("basefont")}} elements.</p>

<p>The <code>&lt;basefont&gt;</code> element has been deprecated in HTML4 and removed in HTML5. This latest specification requires that this element implements {{domxref("HTMLUnknownElement")}} rather than <code>HTMLBaseFontElement</code>.</p>

<h2 id="属性">属性</h2>

<p><em>从父类 {{domxref("HTMLElement")}} 继承属性。</em></p>

<dl>
 <dt>{{domxref("HTMLBaseFontElement.color")}}</dt>
 <dd>Is a {{domxref("DOMString")}} representing the text color using either a named color or a color specified in the hexadecimal <code>#RRGGBB</code> format.</dd>
 <dt>{{domxref("HTMLBaseFontElement.face")}}</dt>
 <dd>Is a {{domxref("DOMString")}} representing a list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.</dd>
 <dt>{{domxref("HTMLBaseFontElement.size")}}</dt>
 <dd>Is a {{domxref("DOMString")}} representing the font size as either a numeric or relative value. Numeric values range from <code>1</code> to <code>7</code> with <code>1</code> being the smallest and <code>3</code> the default. Relative value starts with a <code>'+'</code> or a <code>'-</code>'.</dd>
</dl>

<h2 id="方法">方法</h2>

<p><em>无具体方法;从父类 {{domxref("HTMLElement")}} 继承方法。</em></p>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">状态</th>
   <th scope="col">备注</th>
  </tr>
  <tr>
   <td>{{SpecName("DOM2 HTML", "html.html#ID-32774408", "HTMLBaseFontElement")}}</td>
   <td>{{Spec2('DOM2 HTML')}}</td>
   <td>No change</td>
  </tr>
  <tr>
   <td>{{SpecName("DOM1", "level-one-html.html#ID-32774408", "HTMLBaseFontElement")}}</td>
   <td>{{Spec2('DOM1')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

<div>


<p>{{Compat("api.HTMLBaseFontElement")}}</p>
</div>

<h2 id="参见">参见</h2>

<ul>
 <li>The HTML element {{HTMLElement("basefont")}} <em>was</em> implementing this interface.</li>
</ul>