<color>:指定颜色。
当同时定义了背景颜色和背景图像时,背景图像覆盖在背景颜色之上。
如果设置了 <' background-image '>,同时也建议设置 <' background-color '> 用于当背景图像不可见时保持与文本颜色有一定的对比度。
对应的脚本特性为backgroundColor。
Values | IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|---|
Basic Support | 6.0+ | 2.0+ | 4.0+ | 3.1+ | 3.5+ | 3.2+ | 2.1+ | 18.0+ |
transparent | ||||||||
RGBA, HSL, HSLA | 6.0-8.0 | |||||||
9.0+ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
点击 "运行实例" 按钮查看在线实例