-
HTML5 - Lessons 17
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
Lecture1.5
-
Lecture1.6
-
Lecture1.7
-
Lecture1.8
-
Lecture1.9
-
Lecture1.10
-
Lecture1.11
-
Lecture1.12
-
Lecture1.13
-
Lecture1.14
-
Lecture1.15
-
Lecture1.16
-
Lecture1.17
-
-
CSS3 - Lessons 22
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
Lecture2.5
-
Lecture2.6
-
Lecture2.7
-
Lecture2.8
-
Lecture2.9
-
Lecture2.10
-
Lecture2.11
-
Lecture2.12
-
Lecture2.13
-
Lecture2.14
-
Lecture2.15
-
Lecture2.16
-
Lecture2.17
-
Lecture2.18
-
Lecture2.19
-
Lecture2.20
-
Lecture2.21
-
Lecture2.22
-
-
Responsive Website From Scratch 7
Background Image
CSS background-image Property
Example
Set a background-image for the <body> element:
body {
background-image: url(“paper.gif”);
background-color: #cccccc;
}
Example
Set two background images for the <body> element:
body {
background-image: url(“img_tree.gif”), url(“paper.gif”);
background-color: #cccccc;
}
CSS Syntax
background-image: url|none|initial|inherit;
Property Values
Value | Description |
---|---|
url(‘URL‘) | The URL to the image. To specify more than one image, separate the URLs with a comma |
none | No background image will be displayed. This is default |
linear-gradient() | Sets a linear gradient as the background image. Define at least two colors (top to bottom) |
radial-gradient() | Sets a radial gradient as the background image. Define at least two colors (center to edges) |
repeating-linear-gradient() | Repeats a linear gradient |
repeating-radial-gradient() | Repeats a radial gradient |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |