Two background image merging methods are available: ① You can combine the background image into an image by PS, and then use background-position to locate the background image. ② If you don't know the PS, you can use the CSS background image merging tool to directly select the image and generate an image in the corresponding format online, which is convenient and quick. Background Syntax: Background-color: red | # RGB; Background-position: X axis coordinate Y axis coordinate | left | right | center | top .. Background-size: 100px | 30% | cover | contain;Online Testing Background-repeat: repeat | no-repeat | repeat-x | repeat-Y Background-origin: border | padding | content Background-clip: border-box | padding-box | content-box Background-attachment: fixed | scroll Background-image: url Abbreviated form:Background: color url () positon repeat; Note:If only one value is set for the attribute value of background-size, the second value is set"Auto". Cover:To extend the background image to a large enough size, so that the background image completely overwrites the background area. Contain:Extend the image size to the maximum size so that its width and height fully adapt to the content area. Technical advantages of background image merging:The background image merging technology can reduce requests to the server, save time and bandwidth, and greatly improve website acceleration. It can achieve rounded corners on both sides and infinitely extending in the middle. it overwrites the parent label through the sub-tab background, nesting the three layers, intercepting the middle part of the image and the left and right sides, calculating the position of the image, and then using position to locate the image. |