css3中font-face属性的用法详解
来源:互联网 发布:mysql if与case性能 编辑:程序博客网 时间:2024/05/18 01:18
/*font-face 格式
@font-face{ font-family:SingleMaltaRegular;src: <source> [<format>][,<source> [<format>]]*;font-weight: normal;font-style: normal; }*取值说明:
*YourWebFontName:此值指的就是你自定义的字体名称,最好是使用你下载的默认字体,他将被引用到你的Web元素中的font-family。如“font-family:"YourWebFontName";”
*source:此值指的是你自定义的字体的存放路径,可以是相对路径也可以是绝路径;
*format:此值指的是你自定义的字体的格式,主要用来帮助浏览器识别,其值主要有以下几种类型:truetype,opentype,truetype-aat,embedded-opentype,avg等;
*weight和style:这两个值大家一定很熟悉,weight定义字体是否为粗体,style主要定义字体样式,如斜体。
*页面调用方法:
第一种方法:<i class="icon-index-max" aria-hidden="true" data-icon="&#xe02b;"></i>
第二种方法:<i class="icon-podcast icon-index-max"></i>
*/
@font-face { font-family: 'icomoon'; src: url('../fontface/icomoon.eot');/* IE9 Compat Modes */ src: url('../fontface/icomoon.eot?#iefix') format('embedded-opentype'),/* IE6-IE8 */url('../fontface/icomoon.woff') format('woff'),/* Modern Browsers */url('../fontface/icomoon.ttf') format('truetype'),/* Safari, Android, iOS */url('../fontface/icomoon.dev.svg#icomoon') format('svg');/* Legacy iOS */ font-weight: normal; font-style: normal;}/* Use the following CSS code if you want to use data attributes for inserting your icons */[data-icon]:before {font-family: 'icomoon'; content: attr(data-icon); speak: none;font-weight: normal;font-variant: normal; text-transform: none;font-style: normal;line-height: 1;-webkit-font-smoothing: antialiased; }/**font-family:设置文本的字体名称*font-style:设置文本样式*font-variant:设置文本是否大小写。设置文本是否大小写,设置小型大写字母的字体显示文本,这意味着所有的小写字母均会被转换为大写,但是所有使用小型大写字体的字母与其余文本相比,其字体尺寸更小*text-transform:属性控制文本的大小写*font-weight:设置文本的粗细*font-stretch:设置文本是否横向的拉伸变形*font-size:设置文本字体大小*src:设置自定义字体的相对路径或者绝对路径,注意,此属性只能在@font-face规则里使用*-webkit-font-smoothing: 设置字体的抗锯齿或者说光滑度的属性*/
本文转自:http://www.9aixuexi.com/web/cd/arc_36747.html
0 0
- css3中font-face属性的用法详解
- CSS3中 @font-face用法介绍
- css3中@font-face
- css3的font-face
- CSS3中字体@font-face的使用
- CSS3 @font-face详细用法
- @Font-face 的用法
- 【转】@font-face中#iefix的详解
- @font-face中#iefix的详解
- CSS3 @font-face详细用法local
- 网页中导入特殊字体@font-face属性详解
- 网页中导入特殊字体@font-face属性详解
- 网页中导入特殊字体@font-face属性详解
- 网页中导入特殊字体@font-face属性详解
- css网页中导入特殊字体@font-face属性详解
- @font-face的format属性
- @font-face的详细用法
- CSS3下的@font-face规则
- Hibernate的优化初步
- 为何UE复制粘贴不能用了?
- java实现短信验证码
- Python Import机制-模块搜索路径(sys.path)、嵌套Import、package Import
- Torch/Lua学习资料汇总
- css3中font-face属性的用法详解
- 离散事件模拟-银行管理
- hdu4005The war
- POJ 1852 Ants(弹性碰撞问题)
- 用java写输出1~100的递归表达式?代码
- iOS 3D touch OC代码
- Java安全套接字扩展——JSSE
- OC---KVC操作
- refresh的停车场