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

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

CSS 单位


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

尺寸

单位 描述
% percentage 百分比
in inch 英尺
cm centimeter 厘米
mm millimeter 公厘
em one em is equal to the current font size of the current element
相对长度单位。相对于当前对象内文本的字体尺寸
ex one ex is the x-height of a font (x-height is usually about half the font-size)
相对长度单位。相对于字符“x”的高度。此高度通常为字体尺寸的一半。
pt point (1 pt is the same as 1/72 inch)
绝对长度单位 (1pt等于 1/72英寸)
pc pica (1 pc is the same as 12 points)
绝对长度单位。派卡(Pica)
px pixels (a dot on the computer screen)
相对长度单位。像素(Pixel)

颜色

单位 描述
color_name A color name (e.g. red)
颜色的名称(比如 red)
rgb(x,x,x) An RGB value (e.g. rgb(255,0,0))
RGB值
rgb(x%, x%, x%) An RGB percentage value (e.g. rgb(100%,0%,0%))
RGB占有百分比值
#rrggbb A HEX number (e.g. #ff0000)
十六位数

评论 (0) All

登陆 | 还没注册?