Color for styled placeholder text is muted in Firefox

前端 未结 2 1469
[愿得一人]
[愿得一人] 2021-01-24 01:54

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.

相关标签:
2条回答
  • 2021-01-24 02:17

    I think you are expecting this, just try this once,

    input[type="text"]:hover::-moz-placeholder {
        color: #000000;
    }
    

    above is for text inputs if you need for all inputs remove [type='text']. Okay

    0 讨论(0)
  • 2021-01-24 02:33

    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.

    Try setting opacity: 1 in addition to the color.

    0 讨论(0)
提交回复
热议问题