首页 > 其他 > 详细

如何让textarea placeholder 文字垂直居中

时间:2019-08-16 11:04:52      阅读:169      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
  #textArea {
    color: white;
    height: 50px;
  }
  #textArea::-webkit-input-placeholder{
    height: 50px;line-height: 50px
  } /* 使用webkit内核的浏览器 */
  #textArea:-moz-placeholder{
    height: 50px;line-height: 50px
  } /* Firefox版本4-18 */
  #textArea::-moz-placeholder{
    height: 50px;line-height: 50px
  } /* Firefox版本19+ */
  #textArea:-ms-input-placeholder{
    height: 50px;line-height: 50px
  }
</style>
</head>
<body>
  <textarea id="textArea" name="" placeholder="请输入"></textarea>
</body>
</html>

 

效果图如下

技术分享图片

 

如何让textarea placeholder 文字垂直居中

原文:https://www.cnblogs.com/lyl119456/p/11362045.html

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