【发布时间】:2014-12-30 12:27:39
【问题描述】:
我试图让我的广告牌图像大约 2200 像素 965 像素固定在一个 div 内,以扩大屏幕宽度和 500 像素高度,而不会丢失图像的任何部分。这可能吗,我在完成这个任务时遇到问题。
<div class="billboard"> </div>
css:
height: 500px;
background-repeat: no-repeat;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
width: 100%;
display:block;
width:100%;
【问题讨论】:
标签: css image background