【发布时间】:2015-01-31 10:48:11
【问题描述】:
.baner {
background-image: url('ban.jpg');
background-size: cover;
background-repeat: no-repeat;
position: fixed;
width: 100%;
height: 35%;
top: 60px;
}
不会在这个背景上做封面,但是当我做 png 图像时它可以工作,我不明白为什么:
.baner {
background-image: url('ban.png');
background-size: cover;
background-repeat: no-repeat;
position: fixed;
width: 100%;
height: 35%;
top: 60px;
}
【问题讨论】:
标签: css background-size