Home > Article > Web Front-end > Instructions for using the css background-color property
Syntax:
background-color : transparent | color
Parameters:
transparent: The background color is transparent
color: Specify the color. See Color Units and Appendix: Color Table
Description:
Sets or retrieves the background color of the object .
The corresponding script feature is backgroundColor. Please see other books I have written.
Example:
p { background-color: silver } div { background-color: rgb(223,71,177) } body { background-color: #98AB6F } pre { background-color: transparent; }
background-color -- Background color, defines the color of the background
Value: b10fb37415d019cfffa8c4d7366c607f | transparent | inherit
b10fb37415d019cfffa8c4d7366c607f: color representation
transparent: transparent
inherit: inherit
Initial value: transparent
Inheritance: Yes
Applicable to: all elements
background: background.color: color.
The background color corresponds to the foreground color, which is OK Define the color of the background.
Example
body { background-color:green;}
Define the background of the web page to use green.
The above is the detailed content of Instructions for using the css background-color property. For more information, please follow other related articles on the PHP Chinese website!