Home > Web Front-end > CSS Tutorial > Instructions for using the css background-color property

Instructions for using the css background-color property

黄舟
Release: 2017-06-21 11:49:57
Original
3327 people have browsed it

Syntax:

background-color : transparent | color
Copy after login

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; }
Copy after login

background-color -- Background color, defines the color of the background

Value: | transparent | inherit

: 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;}
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template