CSS中16进制和透明度
CSS中16进制和透明度
透明度从00-FF,一共256个梯度
下面以黑色为例,标准黑色是#000000
,透明度加在最后面,即#000000XX
<div class="fei" style="display: flex"> <div style="background:#00000000;width:20px;height:20px"></div> <div style="background:#00000010;width:20px;height:20px"></div> <div style="background:#00000020;width:20px;height:20px"></div> <div style="background:#00000030;width:20px;height:20px"></div> <div style="background:#00000040;width:20px;height:20px"></div> <div style="background:#00000050;width:20px;height:20px"></div> <div style="background:#00000060;width:20px;height:20px"></div> <div style="background:#00000070;width:20px;height:20px"></div> <div style="background:#00000080;width:20px;height:20px"></div> <div style="background:#00000090;width:20px;height:20px"></div> <div style="background:#000000A0;width:20px;height:20px"></div> <div style="background:#000000B0;width:20px;height:20px"></div> <div style="background:#000000C0;width:20px;height:20px"></div> <div style="background:#000000D0;width:20px;height:20px"></div> <div style="background:#000000E0;width:20px;height:20px"></div> <div style="background:#000000F0;width:20px;height:20px"></div> <div style="background:#000000FF;width:20px;height:20px"></div> </div>