效果图:

html:

            <div>
<form action="">
<div class="ta-div" contenteditable="true"><br /></div>
<input type="button" value="发布" class="mtb60 btn btn-lg cf bgc-52c4d5 pct40">
</form>
</div>

css:

            .ta-div{
width: 100%;
min-height: 200px;
max-height: 400px;
height: 200px;
border: 1px solid #8b8b8b;
word-wrap: break-word;
overflow-y: auto;
}
.bgc-52c4d5 {
background-color: #52c4d5;
}
.cf {
color: #fff;
}
.mtb60 {
margin-top: 60px;
margin-bottom: 60px;
}
.pct40 {
width: 40%;
}
.btn-lg {
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px;
}
.btn {
display: inline-block;
font-weight:;
text-align: center;
white-space: nowrap;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
}

变相实现textarea文本域的更多相关文章

  1. div模拟textarea文本域轻松实现高度自适应

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. Kindeditor富文本实现textarea文本域的上传及单独button 按钮绑定(用来实现单文件上传)

    在最近项目要新增一个内容文章,文章包含一般的正文内容,其中正文中可以包含多张图片.文章最多包含一个音频文件.文章正文的上传功能我是通过textarea文本域绑定kindeditor编辑器实现的,而单独 ...

  3. div模拟textarea文本域轻松实现高度自适应——张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=1362 一.关于tex ...

  4. textarea文本域的高度随内容的变化而变化

    用css控制textarea文本域的高度随内容的变化而变化,不出现滚动条. CSS代码: 复制代码 代码如下: .t_area{ width:300px; overflow-y:visible } & ...

  5. textarea文本域轻松实现高度自适应

    转载:http://www.xuanfengge.com/textarea-on-how-to-achieve-a-high-degree-of-adaptive.html 今天需要些一个回复评论的页 ...

  6. css之——div模拟textarea文本域的实现

    1.问题的出现: <textarea>标签为表单元素,但一般用于多行文本的输入,但是有一个明显的缺点就是不能实现高度自适应,内容过多就回出现滚动条. 为了实现高度自适应:用div标签来代模 ...

  7. 使用contenteditable+div模拟textarea文本域实现高度自适应

    使用contenteditable+div模拟textarea文本域实现高度自适应 开发过程中由于需要在发送消息的时候需要有一个可以高度自适应的文本域,一开始是使用textarea并搭配auto-si ...

  8. textarea文本域宽度和高度(width、height)自己主动适应变化处理

    文章来源:http://www.cnblogs.com/jice/archive/2011/08/07/2130069.html <HTML> <HEAD> <TITLE ...

  9. HTML学习笔记 域元素(form表单、textarea文本域、fieldset域集合、input使用) 案例 第四节 (原创)

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

随机推荐

  1. tomat startup.bat 日志乱码问题解决

    1.修改conf 下的logging.properties java.util.logging.ConsoleHandle.encoding=GBK C:\Users\Administrator> ...

  2. CF1097D Makoto and a Blackboard

    题目地址:CF1097D Makoto and a Blackboard 首先考虑 \(n=p^c\) ( \(p\) 为质数)的情况,显然DP: 令 \(f_{i,j}\) 为第 \(i\) 次替换 ...

  3. Linux Shell脚本编程

    ⒈为什么要学习Shell编程 1)Linux运维工程师在进行服务器集群管理时,需要编写Shell程序来进行服务器管理 2)对于JavaEE和Python程序员来说,有些工作需要编写一些Shell脚本进 ...

  4. inception v1-v3 & Xception

    inception v1-v3:通过多尺度卷积核学习不同尺度的空间信息并进行耦合:通过多个小卷积核来代替大卷积核的功能从而降低计算量: 通常,在一组特征图上进行卷积需要三维的卷积核,也即卷积核需要同时 ...

  5. 使用Crash工具分析 Linux dump文件【转】

    转自:https://blog.csdn.net/bytxl/article/details/45025183 前言 Linux 内核(以下简称内核)是一个不与特定进程相关的功能集合,内核的代码很难轻 ...

  6. CMOS Sensor的调试经验分享【转】

    转自:https://blog.csdn.net/yapingmcu/article/details/37817727 转自:http://bbs.52rd.com/forum.php?mod=vie ...

  7. linux的/etc/profile环境变量设置不生效【原创】

    设置/etc/profile的java环境变量不生效 修改环境变量 /etc/profile JAVA_HOME=/opt/software/jdk1..0_25 PATH=/usr/local/sb ...

  8. HTML5实现全屏

    现在主流的浏览器都支持全屏,但是各家实现不一.下面是主流浏览器实现方法: // W3C 提议 element.requestFullscreen(); element.exitFullscreen() ...

  9. javascript动态的改变checkbox的选中状态

    <td> <div class="checkbox"> <label> <input type="checkbox" ...

  10. sonar——Synchronized classes Vector, Hashtable, Stack and StringBuffer should not be used

    It is better to use their new unsynchronized replacements: ArrayList or LinkedList instead of Vector ...