[] BlogJava@王战锋, Dic.cn, 21Days@Tuota25, 英语学习, 每日一句

中国青年

[ Notes ] CSS的5个伪类@page,@media,@important,@font-face,@charset

  1. @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.
  2. @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 ; } } 所有显示样式
  3. @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"
  4. @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.

  5. @charset sCharacterSet
    /* 声明字符集 */
    例如:
    @charset "gb2312" 等于 META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"



海纳百川,有容乃大;壁立千仞,无欲则刚。

posted on 2008-04-26 19:07 王战锋 阅读(842) 评论(0)  编辑  收藏 所属分类: CSS


只有注册用户登录后才能发表评论。


网站导航:
 
<2008年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

导航

统计

公告

为人处世要光明磊落,与人相处要稀里糊涂。
说实话,做实事;先做后说,多做少说。

常用链接

留言簿(3)

随笔分类(11)

随笔档案(12)

文章分类(958)

文章档案(957)

新闻分类(5)

新闻档案(5)

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜