Saturday, 8 April 2017

css background

CSS Background

All CSS Background Properties

The number in the "CSS" column indicates in which CSS version the property is defined (CSS1 or CSS2).

Property
Description
Values
background
Sets all the background properties in one declaration
background-color
background-image
background-repeat background-attachment background-position
inherit
background-attachment
Sets whether a background image is fixed or scrolls with the rest of the page
scroll
fixed
inherit
background-color
Sets the background color of an element
color-rgb
color-hex
color-name
transparent
inherit
background-image
Sets the background image for an element
url(URL)
none
inherit
background-position
Sets the starting position of a background image
left top
left center
left bottom
right top
right center
right bottom
center top
center center
center bottom
x% y%
xpos ypos
inherit
background-repeat
Sets if/how a background image will be repeated
repeat
repeat-x
repeat-y
no-repeat
inherit

<table style ="background-image:url(/images/pattern1.gif);">
<table style ="background-image:url(/images/pattern1.gif); background-repeat:repeat;”>
Shorthand Property
You can use the background property to set all the background properties at once. For example:
<p style="background:url(/images/pattern1.gif) repeat fixed;">
This parapgraph has fixed repeated background image.
</p>

No comments:

Post a Comment

Please write your view and suggestion....