Hex colors: Numeric representation for “transparent”?

后端 未结 8 882
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 09:56

I am building a web CMS in which the user can choose colours for certain site elements. I would like to convert all colour values to hex to avoid any further formatting hass

相关标签:
8条回答
  • 2020-12-05 10:24

    Transparency is a property outside the color itself, also known as alpha component. You can't code it as RGB.

    If you want a transparent background, you can do this:

    background: transparent;
    

    Additionally, I don't know if it might be helpful or not but, you could set the opacity property:

    .half{
      opacity: 0.5;
      filter: alpha(opacity=50);
    }
    

    You need both in order to get it working in IE and all other decent browsers.

    0 讨论(0)
  • 2020-12-05 10:26

    Use following hexadecimal code for transparent text colour: #00FFFF00

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