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

CSS
CSS2 Aural
CSS 单位
CSS 颜色
CSS 颜色值
CSS 颜色名称
CSS 编码与组织技巧
CSS 模块化设计思路
CSS完美兼容IE6/IE7/FF的通用方法
CSS @ Ten: 下一个重要的东西

CSS font属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 388 ::
收藏到网摘: 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

登陆 | 还没注册?