CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

Background Image in CSS

The background-image Property

 

 

The background-image property sets one or several background images in an element. It can be set for the whole page/body or even for a single element inside the body.

 

Syntax:-

 

Its syntax is:-

< style >

element{

background-image: url| none| initial| inherit;

}

<  /style >

 

Further Explanation:-

 

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.
conic-gradient() Sets a conic gradient as the background image.
linear-gradient() Sets a linear gradient as the background image.
radial-gradient() Sets a radial gradient as the background image.
repeating-conic-gradient() Repeats conic gradient
repeating-linear-gradient() Repeats linear gradient
repeating-radial-gradient() Repeats radial gradient
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Advance

All Sections related to CSS