更改输入占位符颜色较深 [英] Change input placeholder color darker

查看:105
本文介绍了更改输入占位符颜色较深的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照这篇文章(),Chrome上的颜色为红色,但Firefox上的 light-red
我想在Firefox上的颜色和Chrome一样。

解决方案

我发现您需要重写不透明度。

  ::  -  webkit-input-placeholder {/ * WebKit浏览器* / 
color:red;
opacity:1!important;
}


Follow this article (Style text input placeholder), i can change the color of the text input placeholder to red color. But it is always a light-red color, not red exactly.

Is there any way to make it a red color exactly?

update

The color on Chrome is red (this is correct), the color on Firefox is not red, it is light-red or blurred, i guessed that.


EDIT (from the OP answer):

Please check this example (http://jsfiddle.net/LQkQG/), the color is red on Chrome, but light-red on Firefox. I want the color on Firefox same with the Chrome.

解决方案

I've found you need to override opacity.

::-webkit-input-placeholder { /* WebKit browsers */
    color:    red;
     opacity: 1 !important;
}

这篇关于更改输入占位符颜色较深的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆