最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

font-family Attribute | fontFamily Property

Internet Development Index

Sets or retrieves the name of the font used for text in the object.

Syntax

HTML { font-family : sFamily }
Scriptingobject.style.fontFamily [ = sFamily ]

Possible Values

sFamilyString that specifies or receives one of the following values.
family-nameAny of the available font families supported by the browser. For example, Times, Helvetica, Zapf-Chancery, Western, or Courier.
generic-nameAny of the following font families: serif, sans-serif, cursive, fantasy, or monospace.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has no default value. The Cascading Style Sheets (CSS) attribute is inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

The value is a prioritized list of font family names and generic family names. List items are separated by commas to minimize confusion between multiple-word font family names. If the font family name contains white space, it should appear in single or double quotation marks; generic font family names are values and cannot appear in quotation marks.

Because you do not know which fonts users have installed, you should provide a list of alternatives with a generic font family at the end of the list. This list can include embedded fonts. For more information about embedding fonts, see the @font-face rule.

The default for this property can be set for Microsoft® Internet Explorer on the General tab of the Internet Options menu by clicking the Fonts button.

Examples

The following example shows how to use a call to an embedded style sheet to set the font-family attribute .

<HTML>
<HEAD>
<STYLE>
P {font-family:"ARIAL"}
.other {font-family:"COURIER"}
</STYLE>
</HEAD>
<BODY>
<P tabindex="1" onkeydown="this.className='other'"
onmousedown="this.className='other'" onmouseup="this.className=''"
onkeyup="this.className=''">Tab to select this paragraph and press down a
key or just click on it with the mouse to change the font-family style
attribute to COURIER.</P>
</BODY>
</HTML>  
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

The following example shows how to use inline scripting to change the fontFamily property.

<HTML>
<BODY>
<DIV tabindex ="1" onkeydown="this.style.fontFamily='Courier'"
onkeyup="this.style.fontFamily=''" onmousedown="this.style.fontFamily='Courier'"
onmouseup="this.style.fontFamily=''">Tab to select this DIV element and press
down a key or just click on it with the mouse to change the fontFamily style
property to COURIER.
</DIV>
</BODY>
</HTML>   
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

The following example shows how to define a hierarchy of fonts, in this case, an embedded font and a system font. The browser goes through the list until it finds a font it can apply. This is useful when the Web author wishes to employ fonts that might or might not be accessible or loaded onto a user's machine.

<STYLE type="text/css">
@font-face {
font-family: "My_font";
src: url(http://www.adatum.com/some_font_file.eot);
}
BODY {font-family: "My_font", Arial}
</STYLE>

Standards Information

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Non-Microsoft link.

Applies To

A, ADDRESS, B, BASEFONT, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, CUSTOM, DD, defaults, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

font
阿拉善右旗| 华安县| 普定县| 平乐县| 广丰县| 锡林浩特市| 灌阳县| 保亭| 双江| 洪江市| 泗洪县| 宁化县| 海原县| 惠水县| 古浪县| 曲麻莱县| 安顺市| 偏关县| 瑞安市| 邓州市| 新田县| 开江县| 时尚| 灵寿县| 凉城县| 辽阳市| 南陵县| 隆安县| 晋江市| 昭苏县| 云阳县| 清镇市| 怀仁县| 汽车| 高州市| 广德县| 拉孜县| 云霄县| 曲阳县| 宁明县| 广元市|