Is there a color code for transparent in HTML?

前端 未结 9 571
抹茶落季
抹茶落季 2021-01-31 07:25

I\'m building a new website, and I\'m looking for a transparent navigation bar so the background is visible.

9条回答
  •  醉梦人生
    2021-01-31 07:58

    All you need is this:

    #ffffff00
    

    Here the ffffff is the color and 00 is the transparency

    Also, if you want 50% transparent color, then sure you can do... #ffffff80

    Where 80 is the hexadecimal equivalent of 50%. Since the scale is 0-255 in RGB Colors, the half would be 255/2 = 128, which when converted to hex becomes 80

    And since in transparent we want 0 opacity, we write 00

提交回复
热议问题