div模拟textarea文本域轻松实现高度自适应
2015-09-24 10:03
288 查看
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>div模拟textarea文本域轻松实现高度自适应</title>
<style>
h2 {
text-align: center;
margin: 50px auto;
}
.test_box {
width: 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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>div模拟textarea文本域轻松实现高度自适应</title>
<style>
h2 {
text-align: center;
margin: 50px auto;
}
.test_box {
width: 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
相关文章推荐
- 图片变形的抗锯齿处理方法
- FTPClien文件流传输ftpClient.retrieveFileStream(remoteFileName)
- 多种链表
- css3学习之旅-css的基本语法(1)
- SRM 668 DIV 2 AnArray 1000-point
- css3学习之旅-css的基本语法(1)
- css3学习之旅-css的基本语法(1)
- 杭电1713 相遇周期
- C# 两个类之间传递数据
- css3学习之旅-css的基本语法(1)
- 项目管理要做啥
- NSString,NSArray和NSDictionary to JSON标准格式字符串
- hadoop资料地址
- 转发与重定向的区别
- 反射详解
- hdu1448 寒冰王座 dp问题
- python boost environment setup
- oninput,onpropertychange,onchange的用法和区别
- 错误1083:配置成在该可执行程序中运行的这个服务不能执行该服务 【解决】
- Java基础知识强化54:经典排序之插入排序(InsertSort)