样式占位符文本的颜色在Firefox中被静音 [英] Color for styled placeholder text is muted in Firefox

查看:79
本文介绍了样式占位符文本的颜色在Firefox中被静音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用相关的供应商前缀更改了占位符的颜色,并且该颜色在其他浏览器中可以正确显示,但是由于某些原因,Firefox稍微将其静音了.

I've changed the color of my placeholders with the relevant vendor prefixes and it's displaying properly in other browsers, but for some reason Firefox mutes the colors a bit.

::-moz-placeholder, input::-moz-placeholder {color: Black;} 

我同时使用了:-moz-placeholder::-moz-placeholder前缀.有什么建议?

I've used both :-moz-placeholder and ::-moz-placeholder prefixes. Any suggestions?

推荐答案

默认占位符样式的不透明度不同于1,因此,如果您更改输入颜色,则占位符会自动以该颜色的稍微静音的版本结束.

The default placeholder style has an opacity different from 1, so that if you change the input color the placeholder automatically ends up with a slightly muted version of that color.

除了颜色外,请尝试设置opacity: 1.

Try setting opacity: 1 in addition to the color.

这篇关于样式占位符文本的颜色在Firefox中被静音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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