css background property
Translation results:
background
UK[ˈbækgraʊnd] US[ˈbækˌɡraʊnd]
n. (of paintings, etc.) background; background color; background information; soundtrack
plural: backgrounds
css background propertysyntax
How to use the background attribute?
The background attribute is a shorthand attribute that can set all background attributes in one statement. Basic syntax: background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit;
## Function: Background shorthand attribute sets all background attributes in one statement.
Syntax: background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit;
Description: You can set the following attributes:
background-color: Specify the background color to be used. background-position: Set the position of the background image. background-size: Specify the size of the background image. background-repeat: Specify how to repeat the background image. background-origin: Specify the positioning area of the background image. background-clip Specifies the painting area of the background image. background-attachment: Set whether the background image is fixed or scrolls with the rest of the page. background-image: Specify one or more background images to use.Note: IE8 and earlier browsers do not support multiple background images for one element.
css background propertyexample
<html> <head> <style type="text/css"> body { background: skyblue; } </style> </head> <body> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> <p>这是一些文本。</p> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance