zoukankan      html  css  js  c++  java
  • div模拟textarea文本域轻松实现高度自适应

    <!doctype html>

    <html lang="en">

    <head>    

            <meta charset="UTF-8">    

            <title>div模拟textarea文本域轻松实现高度自适应</title>    

            <style>        

                   h2 {            

                        text-align: center;      

                        margin: 50px auto;        

                    }

                   .test_box {            

                         400px;            

                         min-height: 20px;            

                         max-height: 50px;          

                         _height: 120px;            

                         margin-left: auto;            

                         margin-right: auto;            

                         padding: 6px;            

                         outline: 0;            

                         border: 1px solid #a0b3d6;            

                         font-size: 14px;            

                         line-height: 20px;            

                          /*padding: 2px;*/            

                         word-wrap: break-word;            

                         overflow-x: hidden;            

                         overflow-y: auto;            

                         border-radius: 4px;            

                         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>

    </head>

    <body>    

           <h2>div模拟textarea文本域轻松实现高度自适应</h2>    

           <div class="test_box" contenteditable="true"><br /></div>

    </body>

    </html>

    本文地址: http://www.zhangxinxu.com/wordpress/?p=1362

  • 相关阅读:
    C/C++取出变量的每一位的值(第一次知道还有QBitArray)
    什么样的程序员适合去创业公司
    VC2008如何生成及使用DLL(图文并茂,完整版)
    Qt浅谈之二十六图片滑动效果
    Qt 学习之路 2(75):线程总结
    Big Data Ingestion and streaming product introduction
    Qt学习之路(24): QPainter(改写paintEvent)
    Qt学习之路(54): 自定义拖放数据对象
    Qt学习之路(49): 通用算法
    Qt核心剖析: moc
  • 原文地址:https://www.cnblogs.com/tsyr/p/4834387.html
Copyright © 2011-2022 走看看