CSS background-size cover and background-position

后端 未结 3 1133
盖世英雄少女心
盖世英雄少女心 2020-12-13 18:32

HTML:



        
3条回答
  •  温柔的废话
    2020-12-13 18:39

    Just to be clear, background-position percentages are calculated against BOTH the image and the background container. So, background-position: 25% 25%; would find the 25% point for both X and Y on the background container and align the image's 25%,25% point on top of that point.

提交回复
热议问题