likes
comments
collection
share

css十六进制颜色设置透明度

作者站长头像
站长
· 阅读数 36

*透明度从00-FF,一共256个梯度。*以蓝色为例,标准蓝色是color:#0000FF;*透明度设置在色值后位,即#0000FFxx(XX代表透明度)。

实际效果如下:

<div style="background:#0000FF00;width:25px;height:25px"></div>
<div style="background:#0000FF10;width:25px;height:25px"></div>
<div style="background:#0000FF20;width:25px;height:25px"></div>
<div style="background:#0000FF30;width:25px;height:25px"></div>
<div style="background:#0000FF40;width:25px;height:25px"></div>
<div style="background:#0000FF50;width:25px;height:25px"></div>
<div style="background:#0000FF60;width:25px;height:25px"></div>
<div style="background:#0000FF70;width:25px;height:25px"></div>
<div style="background:#0000FF80;width:25px;height:25px"></div>
<div style="background:#0000FF90;width:25px;height:25px"></div>
<div style="background:#0000FFA0;width:25px;height:25px"></div>
<div style="background:#0000FFB0;width:25px;height:25px"></div>
<div style="background:#0000FFC0;width:25px;height:25px"></div>
<div style="background:#0000FFD0;width:25px;height:25px"></div>
<div style="background:#0000FFE0;width:25px;height:25px"></div>
<div style="background:#0000FFF0;width:25px;height:25px"></div>
<div style="background:#0000FFFF;width:25px;height:25px"></div>

css十六进制颜色设置透明度