How do you make an input field opacity not effect the text color inside it?

前端 未结 4 385
孤独总比滥情好
孤独总比滥情好 2021-01-11 09:51

I have a dark/black background image and a white input field. I gave the input field an opacity of 50% and I want the text/value to be solid white(#fff). BUT when I apply th

4条回答
  •  一生所求
    2021-01-11 10:12

    For that you could use background-color: rgba(0, 0, 0, 0.5). The first three numbers are the background color in rgb (red, green, blue) format and the fourth number is the opacity level on a scale from 0 to 1.

提交回复
热议问题