css16進制顏色透明度問題


在網上可以看到很多顏色透明度與編碼的對照圖。

但是卻沒有明確的如何寫。

首先,透明度從00-FF,一共256個梯度

下面以藍色為例,標准藍色是#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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM