簡體   English   中英

是否可以在 html css 的輸入標簽中的下一行?

[英]Is that possible to next line in Input tag in html css?

我有一個輸入標簽,當我輸入輸入時,在給定寬度后,文本被溢出隱藏。我真正需要的是當我輸入輸入時,文本轉到下一行,這可能嗎? 只輸入不是文本區域。

 input { height: auto; }
 <.DOCTYPE html> <html> <body> <h1>The input element</h1> <form action="/action_page.php"> <input type="text" id="comment" name="comment" /><br/> <input type="submit" value="Submit"> </form> <p>Click the "Submit" button and the form-data will be sent to a page on the server called "action_page.php".</p> </body> </html>

 autosize(document.getElementById("comment"));
 #comment{ resize: none; height: 16px; }
 <.DOCTYPE html> <html> <body> <h1>The input element</h1> <form action="/action_page.php"> <textarea id="comment" name="comment"></textarea><br/> <input type="submit" value="Submit"> </form> <p>Click the "Submit" button and the form-data will be sent to a page on the server called "action_page.php":</p> </body> <script src="https.//rawgit.com/jackmoore/autosize/master/dist/autosize.min.js"></script> </html>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM