1. background color
Color-background: Red; / * set the background color to red * /
2. Background image
Image-background: URL ( '../ IMG / 1.jpg'); / * set the background image (default tile) * / background-REPEAT: NO-REPEAT; / * Do not tile * / background-REPEAT: the REPEAT X; / * tiled horizontally * / background-REPEAT: REPEAT-Y; / * tile Vertically * / background-position: 20px 100px; / * set the background image the X-axis 20px, Y-axis 100px * / background-pOSITION- x: 30px; / * set individually x-axis position * / background-y-position: 30px; / * set the individual y-axis position * /
3. Background Positioning
Keywords:
position-background: Top left; / * background image disposed in the upper left * / background-position: Top Center; / * top center * / background-position: Center right; / * right middle * / background-position: Center Center; / * central location * /
percentage:
position-background: 50% 50%; / * central location * / background-position: 100% 100%; / * the bottom right * /