Set the background image position and size

When using a background image, in order to make the image reused in different places, you can make the image larger when making the image, and you can define the size of the image when writing the style in CSS

background:url(../../dist/img/xuanzhong.png) no-repeat right 5px top 5px/25px;

The above indicates that the size and width of the picture is 25px, the height is adaptive, and the background picture is 5px from the right and the top.

Effect picture:

background:#fd9a97 url(../../dist/img/xuanzhong.png) no-repeat right 5px top 5px/25px;}The background contains colors and images

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325813833&siteId=291194637