当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS font属性

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS font属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 387 ::
收藏到网摘: n/a

The font property is, with exception of some system fonts, a shorthand property for setting all of the properties for a font in one declaration.
font属性除了那些系统字体可以设置以外,还可以用速记的方法将所有针对字体的属性都在一句声明中设置好。

Note: This property also has a sixth value: "line-height", which sets the space between lines.
注意:这个属性还可以有第六个值:"line-height",可以用来设置行与行之间的距离

Inherited: Yes
继承性:有

举例

p
{
font: 12px arial
}

p
{
font: italic small-caps bold 12px arial
}

p
{
font: oblique small-caps 900 12px/14px arial
}

p
{
font: menu
}

可用值

描述
font-style
font-variant
font-weight
font-size/line-height
font-family 
Sets the properties for a font. The line-height value sets the space between lines. The value can be a number, a %, or a font size
设置字体的多个属性。line-height可用来设置行与行之间的距离,这个值可以是数字,百分比,或是字体大小
caption Defines the font that are used by captioned controls (like buttons, drop-downs, etc.)
定义用在控件上的说明文字(比如按钮,下拉列表,等等)
icon Defines the fonts that are used by icon labels
定义画像标签的文字字体
menu Defines the fonts that are used by dropdown menus
定义下拉菜单的文字字体
message-box Defines the fonts that are used by dialog boxes
定义使用在对话框上的文字字体
small-caption  
status-bar Defines the fonts that are used by window status bars
定义使用在窗口状态栏上的文字字体

评论 (0) All

登陆 | 还没注册?