请问不设置height只设置line-height具体是什么意思
来源:8-7 利用CSS技巧实现搜索及 banner 区域布局

qq_Simpleisbeau_0
2022-02-16
.search {
margin-bottom: .12rem;
line-height: .32rem;
background: #F5F5F5;
color: #B7B7B7;
border-radius: .16rem;
.iconfont {
display: inline-block;
padding: 0 .08rem 0 .16rem;
font-size: .16rem;
}
&__text {
display: inline-block;
font-size: .14rem;
}
}
写回答
1回答
-
Dell
2022-02-19
因为 height 实际上就是被
line-height
撑起来的,不需要写就可以了
00
相似问题