[ Notes ] CSS的5個(gè)偽類(lèi)@page,@media,@important,@font-face,@charset
- @page sPageSelector { sRules }
sPageSelector - [ :first | :left | :right ]}
例如:
@page :first { body { font-size : 12 px; } }Rule applies to the first page in the collection.
@page :left { body { font-size : 10 px; } }Rule applies to pages on the left side of the binding—verso pages.
@page :right { body { font-size : 14 px; } }Rule applies to pages on the right side of the binding—recto pages. - @media sMediaType { sRules }
sMediaType - [ screen | print | all ]
例如:
@media screen { body { font-size : 12 px ; } } 普通顯示樣式
@media print { body { font-size : 10 px ; } } 打印顯示樣式
@media all { body { font-size : 14 px ; } } 所有顯示樣式 - @important url("sUrl") = @important "sUrl"
sUrl = links an external style sheet to a document.
例如:
@important url("sUrl") 等于 LINK REL="stylesheet" TYPE="text/css" href="sUrl"
@important "sUrl" - @font-face { sFace }
sFace - [ font-family | src:url(sUrl) ]
/* 聲明字體 */
例如:
@font-face { font-family : geogia ;} 等于 BASEFONT face="sFace"
@font-face { url(sUrl);}This paragraph uses the font-face rule defined in the above style element. The rule embeds an OpenType file for the Comic Sans font.
- @charset sCharacterSet
/* 聲明字符集 */
例如:
@charset "gb2312" 等于 META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"
海納百川,有容乃大;壁立千仞,無(wú)欲則剛。
posted on 2008-04-26 19:07 王戰(zhàn)鋒 閱讀(854) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): CSS