Background-position:
| [Percentage | length] {1, 2}
| [Top | center | bottom]
| [Left | center | right] www.86oo.com
Background-position: [percentage | length] is defined by X (X) y (y), such as background-position: 20px 40px; http://www.86oo.com
Background-position: [top | center | bottom] and [left | center | right] have the same meaning, and any two of them can have different effects.
It can be background-position: top center; center bottom; top bottom; left, right .....
Www.86oo.com
Bottom: bottom, top: top, left: left, right: right, center: Middle.
Www.86oo.com
The following is a comparison between pixels and English:
Top left = left top = 0% 0%
Top = top center = centers top = 50% 0%
Right top = top right = 100% 0%
Left = left center = center left = 0% 50%
Center = 50% 50%
Right = right center = center right = 100% 50%
Bottom left = left bottom = 0% 100%
Bottom = bottom center = center bottom = 50% 100%
Bottom right = right center = 100% 100%
86oo tutorial
Background can be used to fill the background color and background image of a specified layer. The format is as follows:
86oo.com
Background: # ccc url('bg.gif ') top left no-repeat;
Fill the entire layer with #ccc(grayscale) and use bg.gif as the background image,
Top left indicates that the image is located at the top left of the current layer, and no-repeat indicates that only the image size is displayed without filling the entire layer.
Top/right/left/bottom/center is used to locate the background image, indicating the top/right/bottom/left/center;
86oo.com provides various tutorials
Background: url('bg.gif ') 20px 100px;
The X coordinate is 20 pixels, And the Y coordinate is 100 pixels;
86oo.com
Repeat/no-repeat/repeat-x/repeat-y
Fill the entire layer/not fill/fill along the X axis/fill along the Y axis respectively.