可点击区域
比如想让一个button周围也可以点击,可以加一个伪类
#btn {
position: relative;
}
#btn::before {
content: "";
position: absolute;
top: -20px;
right: -20px;
bottom: -20px;
left: -20px;
}
图片如何设高不变形
img{
width: 128px;
height: 128px;
object-fit: cover;
}