Lesson 5 CSS Background
Lesson 5 CSS Background
CSS BACKGROUND
Background Property, Background Attachment Property, Background
Position, Background Repeat, Background Shorthand,
Output:
BACKGROUND PROPERTY
You can specify a background image on any element
by setting the location as specified in the url(“location”).
An example would be the following syntax for the web
page body:
BACKGROUND PROPERTY
CSS BACKGROUND PROPERTY
Property Value Description
background-image: url(“location”) Set the background to the
image selected by the url
background-image: none No background
background-image: inherit Background will be the same
as the parent’s
A relative url may also be used as a source of the image for the
background.
BACKGROUND ATTACHMENT PROPERTY
This property allows you to control how the background
scrolls with the web page. There are three types, scroll,
inherit and fixed.