热线电话:13121318867

登录
2019-01-25 阅读量: 718
如何使用CSS禁用textarea的resizable属性?

CSS可调整大小的属性用于设置元素的可调整大小的区域。它主要用于textarea和div元素。要禁用元素的可调整大小的属性,请使用resize为none。这是默认值。
句法
调整大小:无;
例:

<!DOCTYPE html>

<html>

<head>

<title>Disable resize property</title>

<style>

h1 {

color:green;

}

body {

text-align:center;

}

textarea {

overflow:auto;

resize:none;

width:200px;

height:100px;

}

</style>

</head>

<body>

<h1>GeeksforGeeks</h1>

<h2>Disable resize property</h2>

<textarea>GeeksForGeeks: A computer science portal for

geeks. It is a good platform to learn programming.

</textarea>

</body>

</html>

0.0000
4
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子