如何讓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