首页 > 其他 > 详细

关于textarea标签自己遇到的问题

时间:2019-04-28 11:47:53      阅读:131      评论:0      收藏:0      [点我收藏+]
效果描述:
固定文本框的宽高,让文本框不被拖拽,让提示内容的文字垂直居中
技术分享图片

html:

<div>
  <label>活动详情</label>
  <textarea class="textarea" placeholder="富文本编辑器" ></textarea>
</div>
css:
.textarea{
width: 41%;
height: 198px;
resize: none;//禁止拖拽文本框
}
//使提示内容垂直居中
/* 使用webkit内核的浏览器 */
.textarea::-webkit-input-placeholder{
height: 200px;
line-height: 200px;
text-align: center;
}
/* Firefox版本4-18 */
.textarea:-moz-placeholder{
height: 200px;
line-height: 200px;
text-align: center;
}
/* Firefox版本19+ */
.textarea::-moz-placeholder{
height:200px;
line-height:200px;
text-align: center;
}
.textarea:-ms-input-placeholder{
height: 200px;
line-height: 200px;
text-align: center;
}
 
 

关于textarea标签自己遇到的问题

原文:https://www.cnblogs.com/lin-white/p/10782256.html

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