Home > Web Front-end > HTML Tutorial > 设置textarea文本框不可以拖动改变大小_html/css_WEB-ITnose

设置textarea文本框不可以拖动改变大小_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:29:39
Original
2325 people have browsed it

设置textarea文本框不可以拖动改变大小:
在默认状态下,textarea文本框可以使用鼠标拖动调整大小,可能在某些情况下需要禁止此功能。
代码如下:

<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style type="text/css">textarea{  resize:none;  width:150px;  height:50px;}</style></head><body><textarea>蚂蚁部落</textarea> </body></html>
Copy after login

只要给文本框添加如下属性就可以了:

resize:none;
Copy after login

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=13912

更多内容可以参阅:http://www.softwhy.com/divcss/

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template