首页 > Web开发 > 详细

【CSS3】Advanced6:At Rules:@import, @media, and @font-face

时间:2014-04-16 10:06:07      阅读:586      评论:0      收藏:0      [点我收藏+]

1.@import

bolt another stylesheet onto your existing one.

@import url(**.css);

must be placed at the top of a stylesheet, before any other rules.

 

2.@media

screen, print, projection, handheld, and all, or a comma-separated list of more than one,variables relating to that media

eg:@media screen,projection

 

3.@font-face

eg1:@font-face{

font-family:"font of all knowledge";

src:url(fontofallknowledge.woff");

}

create a font named “font of all knowledge” using the font-family descriptor and links the font file “fontofallknowledge.woff” to that name using the src descriptor. “font of all knowledge” can then be used in a standard font rule

The font will be downloaded (in this case from the same directory as the CSS file) and applied to paragraphs

 

eg2:Checking to see if a font is already present on a user’s computer,removing the need to download it,specify which one you’re interested in.

Could use Google Web Fonts


@font-face {
    font-family: "font of all knowledge";
    src: local("font of all knowledge"), local(fontofallknowledge), url(fontofallknowledge.woff);
    font-weight: 400;
    font-style: normal;
}


 

 




【CSS3】Advanced6:At Rules:@import, @media, and @font-face,布布扣,bubuko.com

【CSS3】Advanced6:At Rules:@import, @media, and @font-face

原文:http://www.cnblogs.com/yzhen/p/3667618.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!