你的位置:首页 > 软件开发 > 网页设计 > HTML5 Content Editable实践

HTML5 Content Editable实践

发布时间:2016-09-03 16:00:03
基于此开发文档:https://developer.mozilla.org/zh-CN/docs/Web/Guide/HTML/Content_Editable问题:通过contenteditable实现的输入框没有placeholder,所以自己实现了一下.cd-write{b ...

基于此开发文档:https://developer.mozilla.org/zh-CN/docs/Web/Guide/HTML/Content_Editable

问题:通过contenteditable实现的输入框没有placeholder,所以自己实现了一下

.cd-write{background:#fafafa;padding:8px 12px;position:fixed;left:0;right:0;bottom:0;border-top:solid 1px #dfdede;z-index:10;}.cd-write .btn{background:#fda626;color:white;height:34px;font-size:16px;width:60px;text-align:center;border-radius:5px;line-height:34px;position:fixed;bottom:11px;right:12px;}.cd-write .input{overflow:hidden;padding:8px 6px;border:solid 1px #ebebeb;overflow:auto;background:white;border-radius:5px;min-height:16px;max-height:100px;line-height:140%;outline:none;margin-right:70px;}.cd-write .input:empty:before{content: attr(placeholder);color:#bbb;}

原标题:HTML5 Content Editable实践

关键词:HTML

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。