《CSS揭秘》47 个 css 技巧让你在面对各种 css 问题的时候游刃有余,css 进阶必备。
1.灵活的背景定位
1.background-position 扩展语法,我们可以在 position偏移量前面指定关键字。
.box{
border: 1px solid;
height: 400px;
width: 400px;
margin: 10px auto;
background-image: url('https://123p3.sogoucdn.com/imgu/2020/02/20200213153937_653.png') ;
background-repeat: no-repeat;
/* background: right 20px bottom 10px; */
background-position :right 20px bottom 20px;
}