[英]How to change textarea size on html?
I need to set my textarea size to 64%, but I can't. 我需要将textarea的大小设置为64%,但是不能。 Can you help me to do this. 你能帮我做到这一点吗? Thanks for your help :) 谢谢你的帮助 :)
<!DOCTYPE html>
<html>
<body>
<style>
div.c18 {position: absolute;width:64%;left:18%}
div.c7 {position:relative;overflow:hidden;left:18%;}
</style>
<div class="c7">OTHER</div>
<div class="c18">
<input type="textarea">
</div>
</br>
</body>
</html>
You need to add how many rows and columns you want. 您需要添加所需的行数和列数。
You can do like this: 您可以这样:
<textarea rows="10" cols="80"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non augue nec risus lobortis pulvinar. Mauris imperdiet orci vitae commodo condimentum. Nam molestie risus iaculis enim dictum egestas. Vivamus commodo mauris consectetur diam fringilla, ut tempor nulla volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla feugiat fringilla turpis in feugiat. In hac habitasse platea dictumst. Aenean laoreet orci et varius fermentum. </textarea>
Instead of giving width to the container, give a specific width to the textarea
. 而不是给容器宽度,而给textarea
宽度。 Like: 喜欢:
CSS 的CSS
#area { width: 50%; }
HTML 的HTML
<textarea id="area">
</textarea>
First of all the textarea shall be used by textarea html tag And to give height and width to textarea "rows" and "cols" property will be used. 首先,textarea将由textarea html标签使用,并为textarea赋予高度和宽度,将使用“行”和“ cols”属性。 Please refer below code. 请参考下面的代码。
<textarea rows="10" cols="80"></textarea>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.