CSS (ii)
1. Picture effect
1) Picture border
Border
|
Border-style |
Border-color |
Border-width |
|
Dotted dot Dash
Dashed dashed line
Solid Solid Line |
Color |
Width |
Border:solid 1px #f00;
2) picture and text mixed row
Example: 1.html
2.html
2. Set Page background
1) Background color
Background-color
Example: 3.html,4.html
3) Background image
(1) Background-image:url (xx.jpg) Example: 5.html
(2) Repeating example of background map: 6.html
|
Repeat in vertical direction |
Repeat horizontal direction |
Do not repeat |
|
Background-repeat:repeat-y |
Background-repeat:repeat-x |
Background-repeat:no-repeat |
(3) Background image location Example: 7.html
background-position:30% 70%
background-position:300px 25px
(4) Fixed background image example: 8.html
background-attachment:fixed;
(5) Multiple background picture example: 9.html
(6) Style synthesis settings
Background-color:blue;
Background-image:url (xx.jpg);
Background-repeat:no-repeat;
background-attachment:fixed (background image fixed, used in background content larger than background)
backdground-position:5px 10px; (picture azimuth distance to left and top)
Backdground-size:cover (Let the picture be pulled over the background)
Background:blue URL (xx.jpg) no-repeat fixed 5px 10px; (most convenient to write together)
3, A:link (normal browsing status)
a:visited (clicked link Style)
A:hover (mouse-over style)
A:active (Active style)
4, Overflow:auto (text more than after use automatic)
CSS Common Properties