CSS background-size cover and background-position

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

HTML:



        
3条回答
  •  囚心锁ツ
    2020-12-13 18:41

    If the bottom is more important: background-position: bottom;

    background-position also allows percentage values: 0% 0%; by default.

    The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If you only specify one value, the other value will be 50%.

    You should try background-position: 0% -10%;

提交回复
热议问题