?? ◤css教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0039)http://www.rr365.net/edu-css/css104.htm -->
<HTML><HEAD><TITLE>◤CSS教程.字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃</TITLE>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="CSS教程,CSS技巧 " name=keywords>
<META
content=網(wǎng)頁制作教程:asp教程,ASP.net教程,XML教程,PHP教程,FrontpageXP教程,DreamWeaverMX教程,JSP教程,JavaScript教程,VBScript教程,CSS教程,FrontpageXP,DreamWeaverMX,JSP,JavaScript,VBScript,CSS,asp,ASP.net,XML,PHP相關(guān)技巧及資源
name=description><LINK href="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/style.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY language=Javascript1.2
onmouseover="window.status='歡迎光臨【龍人網(wǎng)站】www.rr365.net,專業(yè)服務(wù)全為您!!!';return true"
onclick=dynOutline() ;>
<TABLE id=table1 width="100%">
<TBODY>
<TR>
<TD background="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo4.gif" colSpan=8
height=30> </TD></TR>
<TR>
<TD width=195 height=53><A href="http://www.rr365.net/index.htm"><IMG
height=53 alt=網(wǎng)站優(yōu)化,網(wǎng)站排名 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo-up.gif"
width=195 border=0></A></TD>
<TD colSpan=7>
<H1 align=center>網(wǎng)頁制作教程:CSS教程</H1></TD></TR>
<TR>
<TD background="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo-bt.gif" height=31>
<P align=center><A
href="http://www.rr365.net/edu-webdesign/index.htm"><FONT
color=#000000>網(wǎng)頁制作教程</FONT></A></P></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/index.htm">首 頁</A></B></TD>
<TD align=middle bgColor=#e5ecf9>
<DIV><B><A
href="http://www.rr365.net/web-promotion.htm">網(wǎng)站推廣</A></B></DIV></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/webrestruction.htm">網(wǎng)站優(yōu)化</A></B></TD>
<TD align=middle bgColor=#e5ecf9>
<DIV><B><A
href="http://www.rr365.net/agent/emarketing.htm">輕松代理</A></B></DIV></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/webhosting.htm">虛擬主機</A></B></TD>
<TD align=middle bgColor=#e5ecf9>
<DIV><B><A
href="http://www.rr365.net/vpp/domain.htm">域名注冊</A></B></DIV></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/webdesign.htm">網(wǎng)站建設(shè)</A></B></TD></TR></TBODY></TABLE>
<TABLE id=table2 width="100%">
<TBODY>
<TR>
<TD bgColor=#00ccff colSpan=2 height=10> </TD></TR>
<TR>
<TD vAlign=top width="23%" bgColor=#e5ecf9 rowSpan=5>
<P><IMG height=25 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo6.gif"
width=25 border=0> <B><A href="http://www.rr365.net/edu-css/css.htm"><FONT
color=#ff0000>CSS教程</FONT></A></B></P>
<UL style="FONT-SIZE: 10pt; LINE-HEIGHT: 13pt">
<LI><A href="http://www.rr365.net/edu-css/css.htm">認(rèn)識CSS</A>
<LI><A href="http://www.rr365.net/edu-css/css102.htm">語法</A>
<LI><A href="http://www.rr365.net/edu-css/css103.htm">偽類—動態(tài)鏈接</A>
<LI><A href="http://www.rr365.net/edu-css/css104.htm">CSS屬性</A>
<LI><A href="http://www.rr365.net/edu-css/css105.htm">CSS定位</A>
<LI>
<P style="LINE-HEIGHT: 13pt" align=left><A
href="http://www.rr365.net/edu-css/css106.htm">濾鏡</A> </P>
<LI>
<P style="LINE-HEIGHT: 13pt" align=left><A
href="http://www.rr365.net/edu-css/css107.htm">CSS結(jié)合JS的運用</A> </P>
<LI>
<P style="LINE-HEIGHT: 13pt" align=left><A
href="http://www.rr365.net/edu-css/css108.htm">如何在網(wǎng)頁中插入CSS</A>
</P></LI></UL>
<P><IMG height=25 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo411.gif"
width=25 border=0> <FONT color=#000000><B><A
href="http://www.rr365.net/edu-css/css2.htm"><FONT
color=#008080>CSS技巧</FONT></A></B></FONT></P>
<P><IMG height=25 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo411.gif"
width=25 border=0> <FONT color=#008080><B>CSS相關(guān)網(wǎng)站</B></FONT></P>
<UL style="FONT-SIZE: 10pt; LINE-HEIGHT: 13pt">
<LI><A href="http://www.w3.org/Style/CSS/" target=_blank>W3C之CSS規(guī)范</A>
<LI><A href="http://www.w3schools.com/css/default.asp" target=_blank>CSS
Tutorial</A> </LI></UL>
<P><IMG height=25 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/logo411.gif"
width=25 border=0> <B><FONT color=#000000><A
href="http://www.rr365.net/edu-css/css4.htm"><FONT
color=#008080>CSS相關(guān)軟件</FONT></A></FONT></B></P>
<P> </P> </TD>
<TD width="77%">
<UL type=square>
<LI>
<P align=left><U><B><FONT size=4>CSS教程.CSS屬性</FONT></B></U></P>
<DIV align=center>
<TABLE id=table4 cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD class=p2 vAlign=top>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt">
從CSS的基本語句就可以看出,屬性是CSS非常重要的部分。熟練掌握了<A
href="http://www.rr365.net/edu-css/css.htm"><FONT
color=#000000>CSS</FONT></A>的各種屬性將會是您編輯頁面更加得心應(yīng)手。下面我們就借助一些實例來講解。
</SPAN></P>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt"> <B><FONT color=#336633>1、
字體屬性</FONT></B> </SPAN></P>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt"> 這是最基本的屬性,您經(jīng)常都會用到。它主要包括以下這些屬性:
</SPAN></P>
<P align=center><SPAN style="FONT-SIZE: 11pt"><IMG height=135
alt=字體屬性 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/css056.gif"
width=493 border=0 orig_onmouseout="null"
orig_onmouseover="null"></SPAN></P>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt"> 光看表格是不是有些難懂,不要緊,我們來看一個用表格中的屬性定義的字體樣式(如下圖):
</SPAN></P>
<P align=center><SPAN style="FONT-SIZE: 11pt"><IMG height=184
alt=不同樣式的字體 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/css003.gif"
width=119 border=0 orig_onmouseout="null"
orig_onmouseover="null"> </SPAN></P>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt"> 第一行只是采用了“font-family”屬性,代碼是這樣的:
<BR> <FONT color=#006666><p style=“font-family:lucida
console”>hongen</p></FONT> <BR> 這行代碼定義了“hongen”將以“l(fā)ucida
console”的字體顯示;
<BR> 第二行font-family為默認(rèn)值,而是定義了“font-style”屬性為“italic”斜體,代碼如下:
<BR> <FONT color=#006666><p
style=“font-style:italic”>hongen</p></FONT>
<BR> 第三行font-family為默認(rèn)值,font-style為“oblique”,另外還定義了“font-weight”屬性為“bold”,“font-size”屬性為24pt(缺省情況下為absolute
size絕對大小)代碼如下:<BR> <FONT color=#006666><p
style=“font-style:oblique;font-weight:bold;font-size:24pt”>hongen</p></FONT>
<BR> 最后一行只是在第三行定義的基礎(chǔ)上又增添了“font-variant”屬性為“small-caps”(小體大寫),代碼如下:
<BR> <FONT color=#006666><p
style=“font-style:oblique;font-weight:bold;font-size:24pt; font-variant:small-caps”>hongen</p></FONT><FONT
color=#ff0066>
</FONT><BR> 值得注意的是:“font-variant”屬性值“small-caps”在指定的小體大寫字體不存在的時候,CSS將用大寫字母代替所有的小寫字母。
<BR> 可能您會問:定義一個字體怎么有那么長的代碼呢?其實字體屬性中還一個“font”屬性,可以實現(xiàn)簡便定義。我們來看下面這段代碼:<BR> <FONT
color=#006666><p style=“font:italic small-caps bold
36pt,GlitzyCurl”>Leaf</p></FONT>
此代碼產(chǎn)生的效果是這樣的(如下圖):</SPAN></P>
<P align=center><SPAN style="FONT-SIZE: 11pt"><IMG height=62
alt=leaf字體1 src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/css004.gif"
width=188 border=0 orig_onmouseout="null"
orig_onmouseover="null"></SPAN></P>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt"> 這段代碼定義了“l(fā)eaf”的字體為GlitzyCurl,并且是斜體、小體大寫、粗體、36號字。這段代碼等同于:
<BR> <FONT color=#006666><p
style=“font-style:italic;font-variant:small-caps;font-weight: bold;font-size:36pt;font-family:GiltzyCurl”>Leaf</p></FONT>
<BR> 怎么樣,是不是精簡了許多。
<BR> 但需要注意的是:如果您用<font>屬性直接定義,一定要注意屬性值的排放順序。 它的排放規(guī)則是按照“font-style”、“font-variant”、“font-weight”、“font-size”、“font-family”的順序,其中沒有定義的以默認(rèn)值顯示。
</SPAN></P>
<P class=p2 style="LINE-HEIGHT: 17pt"><SPAN
style="FONT-SIZE: 11pt"> 其實我們習(xí)慣上還是不用FONT屬性來統(tǒng)一定義,因為分開來定義的代碼雖然很長,但是看上去很直觀,讓人一看就知道定義的內(nèi)容是什么。
<BR> 說一點遺憾之處吧,就是CSS對中文字體的支持可能不是很好。
</SPAN></P></TD></TR></TBODY></TABLE></DIV><BR><BR></LI></UL></TD></TR>
<TR>
<TD>
<P
align=center>
<A href="http://www.rr365.net/edu-css/css103.htm">上一節(jié)</A>|<A
href="http://www.rr365.net/edu-css/css104b.htm">下一節(jié)</A></P></TD></TR>
<TR>
<TD>
<HR width="75%" color=#e5ecf9>
<P align=center>網(wǎng)頁教程: <A
href="http://www.rr365.net/edu-asp/index.htm">ASP</A>| <A
href="http://www.rr365.net/edu-asp-net/asp-net.htm">ASP.net</A>| <A
href="http://www.rr365.net/edu-xml/xml.htm">XML</A>| <A
href="http://www.rr365.net/edu-php/php.htm">PHP4</A> | <A
href="http://www.rr365.net/edu-frontpage/frontpage.htm">FrontpageXP</A> |
<A
href="http://www.rr365.net/edu-dreamweaver/dreamweaver.htm">DreamWeaverMX</A></P>
<P
align=center>
<A href="http://www.rr365.net/edu-cplus/c.htm">C#</A>| <A
href="http://www.rr365.net/edu-jsp/jsp.htm">JSP</A> | <A
href="http://www.rr365.net/edu-javascript/javascript.htm">JavaScript</A> |
<A href="http://www.rr365.net/edu-vbscript/vbscript.htm">VBScript</A> | <A
href="http://www.rr365.net/edu-css/css.htm">CSS</A></P></TD></TR>
<TR>
<TD>
<HR width="50%" color=#e5ecf9>
<P> </P></TD></TR>
<TR>
<TD>
<FORM name=query0 action=http://www1.baidu.com/baidu method=get
target=_blank>
<DIV align=center><INPUT type=hidden value=baidu name=tn0> <A
href="http://www.baidu.com/"><IMG alt=Baidu
src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/baidu_logo.gif" align=bottom
border=0></A> <INPUT size=15 name=word0> <IFRAME border=0 name=I1
marginWidth=0 marginHeight=0
src="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/help1.htm" frameBorder=no width=0
scrolling=no height=0></IFRAME><INPUT type=submit value=百度搜索>
</DIV></FORM> </TD></TR></TBODY></TABLE>
<TABLE id=table3 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="BORDER-BOTTOM: 1px solid" borderColor=#00ccff height=21> </TD></TR>
<TR>
<TD background="◤CSS教程_字體屬性--▃▄ 龍 人 網(wǎng) 絡(luò) ▄▃.files/tdbg.gif"
bgColor=#e5ecf9><P align=center><B><A
href="http://www.rr365.net/summary/aboutus.htm">關(guān)于我們</A>-<A
href="http://www.rr365.net/summary/paymethod.htm">付款方式</A>-<A
href="http://www.rr365.net/helpcenter/helpcenter.htm">幫助中心</A>-<A
href="http://www.rr365.net/agent/agent.htm">輕松代理</A>-<A
href="http://www.rr365.net/sitemap.htm">網(wǎng)站地圖</A>-<A
href="mailto:support@rr365.net">聯(lián)系我們</A></B></P></TD></TR></TBODY></TABLE></BODY></HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -