문제

Why is this ARGB hex not working?

<td style="background-color: #FFFF9980">
도움이 되었습니까?

해결책

Use rgba(255,153,128,1.0) instead of your hex value (though if that really is ARGB it's the same as #ff9980 in RGB - if you meant RGBA then you'll need rgba(255,255,153,0.5)).

다른 팁

the CSS3 spec says:

Unlike RGB values, there is no hexadecimal notation for an RGBA value.

so you will have to use the rgba(255,153,128,1.0) mentioned above.

ARGB Hex color

RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity for a color.

An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

<td style="background-color: rgba(255, 0, 0, 0.2);">

#p1 {background-color:rgba(255,0,0,0.3);}
#p2 {background-color:rgba(0,255,0,0.3);}
#p3 {background-color:rgba(0,0,255,0.3);}
#p4 {background-color:rgba(192,192,192,0.3);}
#p5 {background-color:rgba(255,255,0,0.3);}
#p6 {background-color:rgba(255,0,255,0.3);}
<h1>Define Colors With RGBA Values</h1>

<p id="p1">Red</p>
<p id="p2">Green</p>
<p id="p3">Blue</p>
<p id="p4">Grey</p>
<p id="p5">Yellow</p>
<p id="p6">Cerise</p>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top