首页 > 其他 > 详细

textarea高度自适应

时间:2020-01-17 20:07:16      阅读:81      评论:0      收藏:0      [点我收藏+]

 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<style>
  .textarea{
      width: 400px;
      min-height: 20px;
      max-height: 300px;
      _height: 120px;
      margin-left: auto;
      margin-right: auto;
      padding: 3px;
      outline: 0;
      border: 1px solid #a0b3d6;
      font-size: 12px;
      line-height: 24px;
      padding: 2px;
      word-wrap: break-word;
      overflow-x: hidden;
      overflow-y: auto;
   
      border-color: rgba(82, 168, 236, 0.8);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
  }
</style>
<body>
<div class="textarea" contenteditable="true"><br /></div>
</body>
</html>

textarea高度自适应

原文:https://www.cnblogs.com/dch0/p/12206895.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!