div {
width: 100%;
height: 100%;
background-image: url(../images/bg.jpg);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
CSS - 使背景图片上下左右居中对齐
猜你喜欢
转载自www.cnblogs.com/zhangzhihui/p/12788385.html
今日推荐
周排行