Professional Documents
Culture Documents
Enter Center CSS Chapter 4
Enter Center CSS Chapter 4
4:
Background
1. :
CSS background properties background effects element
CSS properties #
background effects $':
> background-color
> background-image
> background-repeat
> background-attachment
> background-position
2. Background Color:
Background-color property )*, background element
Background color page , body selector:
Ex:
CSS
www.enteritc.com
19
20
www.enteritc.com
CSS
CSS
www.enteritc.com
21
22
www.enteritc.com
CSS
4. Background Image:
Background-image property )*,
z)' background element
'4Iz, repeat element $
Background Image page , body selector:
Ex:
2 body { background-image:url("gradient.jpg");}
2 body { background : url ("gradient.jpg");}
CSS
www.enteritc.com
23
24
www.enteritc.com
CSS
6. Background Image-Position:
I Background image background-position property:
Background-position:
top
left
top
center
top
right
center left
center center
center right
bottom left
bottom center
bottom right
CSS
X%
Y%
Xpos
Ypos
www.enteritc.com
25
Ex:
26
www.enteritc.com
CSS
7. Background-attachment:
2)* BackgroundImage ,2X I* scroll '
Page 2X fix ' page , background-attachment property
background-attachment :
scroll
fixed
Ex:
8. Background-Shorthand property:
Kw $'
background property * background property value
CSS
1.
background-color
2.
background-image
www.enteritc.com
27
3.
background-repeat
4.
background-attachment
5.
background-position
$
) K' property value , , , value
,6
9. #:
28
www.enteritc.com
CSS