html - 文本区域 css 中的行高无法识别

标签 html css textarea

我在我的文本区域 css 中添加了行高,但它仍然无法被识别。文本区域仍然是双倍行距。

form div {
position: relative;
}

input,
select,
textarea {
@include transition(all, 0.3s, ease-in-out);
background: $white-95;
border-radius: 3px;
border: 1px solid $white-85;
box-sizing: border-box;
color: $white-40;
font: 16px/42px $font-body;
font-size: 16px;
margin: 0 0 20px;
max-width: 100%;
padding: 0 15px;
width: 100%;
line-height: normal;

最佳答案

您可以尝试为行高分配一个像素值,以强制文本区域按您的需要显示。

line-height: 20px;

关于html - 文本区域 css 中的行高无法识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34635267/

相关文章:

javascript - 调整 SVG 大小以适应容器大小

html - 如何在打印页面时显示一个div中的所有内容

html - child ul 下拉列表被切断,因为它是 parent 的高度

html - 如何在 ionic v4 的 item-native div 中编辑 "item-inner"类?

使用-webkit-overflow-scrolling : touch 时隐藏的 iOS textarea 文本

jQuery 自动扩展文本区域表现得很奇怪

asp.net - .NET/html,选择 dropdown.ClientID 时元素不存在错误

html - HTML表格的宽度为100%,在tbody中具有垂直滚动

html - div img(svg) 拉伸(stretch)到视口(viewport)高度和宽度

javascript - 使用 jQuery 在 textarea 中插入脚本标签