gpt4 book ai didi

javascript - 当文本靠近边框时,在文本区域中制作第二行

转载 作者:行者123 更新时间:2023-11-28 04:04:19 25 4
gpt4 key购买 nike

我想知道,当我有 textarea 并且当里面的文本接近边框时,我需要它转到第二行,最重要的部分 让 textarea 高一排.

textarea{
width: 100%;
border-radius: 4px;
background-color: #f9f9fb;
border: solid 1px #edeef0;
padding: 6px 40px 6px 20px;
color: #000000;
height: 35px;
max-height: 100px;
max-width: 150px;
}
<textarea placeholder="Add a comment"></textarea>

最佳答案

你的padding right更高,设置为0,

padding: 6px 0px 6px 20px;

关于javascript - 当文本靠近边框时,在文本区域中制作第二行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43030495/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com