输入框的提示文字的样式设置

我们在输入框中时常需要加入提示文字,更改提示文字的样式:

在未更改之前:

<lable>
            <input type="text" placeholder="Name"/>
            <input type="text" placeholder="Email Adress"/>
            <input type="text" placeholder="Phone Number"/>
            <input type="textarea" placeholder="Message"/>
            <button type="submit">Send</button>
          </lable>
1 input{
2   border:1px solid;
3   border-color:transparent transparent #D0D0D0 transparent;
4   /*设置边框
5 颜色透明留下底边*/
6   height:60px;
7   width:400px;
8 }

一样的HTML代码,加入设置placeholder样式的代码:

 1 input::-webkit-input-placeholder{
 2   font-size:25px;
 3 }/*webkit 内核浏览器*/
 4 input::-moz-placeholder{
 5   font-size:25px;
 6 }/*Mozilla Firefox 19+*/
 7 input:-moz-placeholder{
 8   font-size:25px;
 9 }/*Mozilla Firefox 4 to 18*/
10 input:-ms-input-placeholder{
11   font-size:25px;
12 }/*Internet Explorer 10+*/

效果:

 

转载于:https://www.cnblogs.com/xiao-baobao/p/10820670.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值