If is not a sprite image , set the width and height of the image container according to the proportion of the icon on the page, the unit is rem, and then set position-size:100%; can be obtained by the above method The pictures are not very good-looking. It is recommended to use media query to adapt images of different sizes.
If is not a sprite image , set the width and height of the image container according to the proportion of the icon on the page, the unit is
rem
, and then setposition-size:100%
;can be obtained by the above method The pictures are not very good-looking. It is recommended to use media query to adapt images of different sizes.