CSS Color
CSS Color 是一个处理颜色的 CSS 模块,包括颜色类型、颜色混合、不透明度、以及你如何将这些颜色和效果应用于 HTML 内容。
不是所有把 <color>
作为值的 CSS 属性都是这个模块的一部分,但是它们确实依赖这个模块。
参考
属性
数据类型
教程
- Applying color to HTML elements using CSS
- 一份用 CSS 将颜色应用于许多不同类型内容上的教程。所有和颜色相关的 CSS 属性都会涉及。
工具
- Color picker tool
- 该工具能让你创建、调整和试验自定义颜色变得简单。
规范
Specification | Status | Comment |
---|---|---|
CSS Color Module Level 4 | Working Draft | |
CSS Color Module Level 3 | Recommendation | |
CSS Level 2 (Revision 1) | Recommendation | |
CSS Level 1 | Recommendation | 初次定义 |
浏览器兼容性
color
属性
If you're able to see this, something went wrong on this page.
color-adjust
属性
If you're able to see this, something went wrong on this page.
opacity
属性
If you're able to see this, something went wrong on this page.
同时参阅
- 有与颜色有关属性的其他规范:
background-color
,border-color
,outline-color
,text-decoration-color
,text-emphasis-color
(en-US),text-shadow
,caret-color
, andcolumn-rule-color
- 在 CSS 中,渐变不是颜色,而是 images.