非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
-webkit-print-color-adjust
property is a non-standard CSS extension that can be used to force printing of background colors and images in browsers based on the WebKit engine.
/* Keyword values */ -webkit-print-color-adjust: economy; -webkit-print-color-adjust: exact; /* Global values */ -webkit-print-color-adjust: inherit; -webkit-print-color-adjust: initial; -webkit-print-color-adjust: unset;
-webkit-print-color-adjust
property is specified as one of the keyword values listed below.
economy
Normal behavior. Background colors and images are only printed if the user explicitly allows it in their browser's print settings dialog.
exact
Background colors and images of the element to which this rule is applied are always printed, user's print settings are overridden.
Value not found in DB!
Syntax not found in DB!
article {
-webkit-print-color-adjust: exact;
background: #222;
color: #eee;
}
Not part of any standard, though there is a proposal in the CSSWG wiki to standardize it.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-webkit-print-color-adjust
非标
|
Chrome
完整支持
17
注意事项
|
Edge
完整支持
79
注意事项
|
Firefox 不支持 No | IE 不支持 No |
Opera
完整支持
15
注意事项
|
Safari
完整支持
6
注意事项
|
WebView Android
完整支持
37
注意事项
|
Chrome Android
完整支持
18
注意事项
|
Firefox Android 不支持 No |
Opera Android
完整支持
15
注意事项
|
Safari iOS
完整支持
6
注意事项
|
Samsung Internet Android
完整支持
1.0
注意事项
|
完整支持
不支持
非标。预期跨浏览器支持较差。
见实现注意事项。
color-adjust
property - a newer proposal to standardize this property