即使行高设置为1

时间:2016-06-30 16:18:17

标签: html css

查看本网站中心广泛分布的文字:http://www.sharonhadary.com/

我尝试在网络检查器中将line-height属性设置为1(最初设置为1em),但这没什么效果。这对我来说是令人惊讶的,因为看起来文本的行高为2或3。

3 个答案:

答案 0 :(得分:1)

删除巨人font-size并将其修复。

.banner-wrap .banner h2 {
    padding-bottom: 30px;
    color: #ffffff;
    word-spacing: .1em;
    text-transform: uppercase;
    font-family: 'Fjalla One', sans-serif;
    /* font-size: 100px; */ /*REMOVE THIS */
    font-weight: normal;
    line-height: 1.1em;
}

enter image description here

此外,<font>已被弃用,不应再使用

答案 1 :(得分:0)

尝试添加line-height: 22px而不是1em。

答案 2 :(得分:0)

我没有正确理解你的问题但是

1)如果您担心文字中的间距,请从"word-spacing: .1em;"中的.banner h2 CSS规则中删除main_style.css

2)如果您担心行之间的间距,请在line-height中的.banner h2 CSS规则中缩小main_style.css

相关问题