How to set multiple background properties in one declaration

Example analysis:

The background attribute is a shorthand attribute that can set all background attributes in one statement.

The attributes that can be set are: background-color, background-position, background-size, background-repeat, background-origin , background-clip, background-attachment, and background-image.

It doesn’t matter if one of the above values ​​is missing, for example, background: #FF0000 URL (smiley.gif); is allowed .






#

Continuing Learning
||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php(php.cn)</title>
<style>
body
{
background:#ffffff url('https://img.php.cn/upload/article/000/000/015/5c6ba8b3a7ee3101.png') no-repeat
        right top;
margin-right:200px;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>,</p>
<p>,</p>
</body>
</html>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
图片放大关闭