合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
[CSS参考手册](http://css.doyoe.com/)»[属性列表](#)»[文本属性](#)» 相关内容: [**其它文本属性参考**选择其它项](#) - [text-indent](#) - [text-overflow](#) - [text-align](#) - [text-transform](#) - [text-decoration](#) - [text-decoration-line](#) - [text-decoration-color](#) - [text-decoration-style](#) - [text-shadow](#) - [text-fill-color](#) - [text-stroke](#) - [text-stroke-width](#) - [text-stroke-color](#) - [letter-spacing](#) - [word-spacing](#) - [vertical-align](#) - [word-wrap](#) - [white-space](#) - [direction](#) - [unicode-bidi](#) - [line-height](#) - [tab-size](#) # line-height - **版本:CSS1** - 继承性:有 ### 语法: **line-height**:normal | [<length>](#) | [<percentage>](#) | [<number>](#) **默认值**:normal ### 取值: normal:允许内容顶开或溢出指定的容器边界。[<length>](#):用长度值指定行高。可以为负值。[<percentage>](#):用百分比指定行高,其百分比取值是基于字体的高度尺寸。可以为负值。[<number>](#):用乘积因子指定行高。可以为负值。 ### 说明: **检索或设置对象的行高。即字体最底端与字体内部顶端之间的距离。** - 对应的脚本特性为**lineHeight**。 ### 兼容性: - 浅绿 = 支持 - 红色 = 不支持 - 墨绿 = 部分支持 - 橙色 = 实验性质 | [支持版本](# "查看本文档测试时所用浏览器版本")\类型 | IE | Firefox | Safari | Chrome | Opera | |-----|-----|-----|-----|-----|-----| | 版本 | 6.0 | 4.0 | 5.1 | 13.0 | 11.50 | ### 示例: - **固定数值方式:** - {line-height:20px;} 使用固定数值的方式定义line-height,如设置行高为18px类似这样的固定数值,可能会引发文字重叠的现象。 - **百分比方式:** - {line-height:130%;} 如果是这种情况 使用百分比的方式定义line-height,与使用固定数值方式一样,也可能会引发文字重叠的现象。 - **因子方式:** - {line-height:1.5;} 如果是这种情况 使用因子方式定义line-height是非常安全的方式,将可以避免文字重叠的现象。 Copyright © 2006-2012 [Doyoe](http://www.doyoe.com/). All Rights Reserved