Home >Web Front-end >CSS Tutorial >How to set the color of the body in css
How to set the body color in css: 1. Use the "body{color: color value;}" statement to set the font color of the body; 2. Use the "body{background-color: color value;}" statement to set it The background color of the body.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
css sets the font color of the body
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style type="text/css"> body { color: palevioletred; } </style> </head> <body> <div>测试文本</div> <div>测试文本</div> <div>测试文本</div> <div>测试文本</div> <div>测试文本</div> </body> </html>
Rendering:
Description: ## The
#color attribute specifies the color of the text. This attribute sets the foreground color of an element (in HTML representation, the color of the element's text); raster images are not affected by color. This color also applies to all borders of the element, unless overridden by border-color or another border-color property.css sets the background color of the body
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style type="text/css"> body { background-color: paleturquoise; } </style> </head> <body> <div>测试文本</div> <div>测试文本</div> <div>测试文本</div> <div>测试文本</div> <div>测试文本</div> </body> </html>Rendering: Description:
css video tutorial)
The above is the detailed content of How to set the color of the body in css. For more information, please follow other related articles on the PHP Chinese website!