颜色代码六位十六进制字符_8位十六进制颜色
顏色代碼六位十六進制字符
One of the most requested capabilities in my early days of web development was the ability to set opacity on elements and even PNG images without the need for browser-specific CSS or hacks.? Eventually we got native opacity support and even enjoyed rgba(), the ability to cite an opacity level with a color.
在我進行Web開發的初期,最需要的功能之一是無需設置特定于瀏覽器CSS或黑客程序即可在元素甚至PNG圖像上設置不透明度的功能。 最終,我們獲得了本機不透明度支持,甚至享受了rgba() ,它可以用顏色引用不透明度級別。
While I loved the ability to provide an opacity with color using rgba(), the use of hexadecimal color had always been ingrained in me, which made the sudden need for rgba conversions annoying.? Luckily these days we have 8 digit hex values with allow us to cite an opacity level as the last two characters of the hex value!
雖然我喜歡使用rgba()為顏色提供不透明性的能力,但十六進制顏色的使用一直根深蒂固,這使對rgba轉換的突然需求變得煩人。 幸運的是,這些天我們有8位十六進制值,允許我們將不透明度級別作為十六進制值的最后兩個字符!
CSS (The CSS)
Hex implies "six" but the last two digits of the 8 character hex value are the opacity value:
十六進制表示“六個”,但是8個字符的十六進制值的最后兩位是不透明度值:
.myElement {/* { red/50% opacity } *//* pink of white background */background: #ff000080; }I love that we can use hexidecimal colors with the additional opacity value; needing to convert to rgba to take advantage of opacity was a needless frustration.? I owe something to the creator of this API!
我喜歡我們可以將十六進制顏色與附加的不透明度值一起使用; 需要轉換為rgba以利用不透明性是不必要的挫敗感。 我欠這個API的創建者!
翻譯自: https://davidwalsh.name/8-digit-hex
顏色代碼六位十六進制字符
總結
以上是生活随笔為你收集整理的颜色代码六位十六进制字符_8位十六进制颜色的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: codefroces 841B Gods
- 下一篇: music功能 vue_Vue 全家桶实