-7
如何在textarea
中刪除底部填充?如何刪除textarea中的底部填充?
$('textarea').css("height", $("textarea").prop("scrollHeight"))
textarea {
width: 300px;
resize: none;
margin: 0;
padding: 0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<textarea>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a </textarea>
沒有填充,我看不到它 – PRAISER
您正在使用哪種瀏覽器? –
你可能想看看這個https://stackoverflow.com/questions/995168/textarea-to-resize-based-on-content-length – Kiwad