美文网首页
css给placeholder设置颜色

css给placeholder设置颜色

作者: 每天进步一点点5454 | 来源:发表于2021-02-26 13:46 被阅读0次
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>    
        <style>
             #txt{
           height:100%;
          width:230px;
          font-size:12px;color:red;
        }
         #txt::-webkit-input-placeholder{
           color:red;
         }
        </style>
</head>
<body>
    <input type="text" id="txt" placeholder="请输入作者姓名"/>
</body>
</html>

相关文章

网友评论

      本文标题:css给placeholder设置颜色

      本文链接:https://www.haomeiwen.com/subject/nzmmfltx.html