如何让textarea placeholder 文字垂直居中


<!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>

 

效果图如下

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM