我希望云背景在框内缩放。那可能吗?
目前它看起来像这样: http: //freecns.yanlu.de/cumulus1/
不知何故,背景甚至超出了有限的盒子。我尝试了几种方法来解决这个问题,但我找不到错误。我不确定是否有可能做这样的事情。
我使用了以下HTML:
<div class="backgroundbox">
<div class="box_animation"></div>
<ul class="nostyle inline center">
<li class="bboxcontent left">Freecns Cumulus includes over 100 weather specific icons which are shipped as PNG, PDF, EPS and SVG. <br /></li>
<li class="bboxvideo"></li>
</ul>
</div>
和CSS:
.backgroundbox {
position: relative;
z-index: 0;
height: 295px;
width: 816px;
border-radius: 16px;
margin-top: 48px;
margin-left: auto;
margin-right: auto;
background: url('http://www.yanlu.de/files/images/CloudBG.png') no-repeat center;
padding-top: 81px;
}
.bboxcontent {
width: 295px;
font-family: HelveticaNeue-Light;
font-size: 18px;
color: #FFFFFF;
line-height: 22px;
text-shadow: 0px 1px 2px rgba(0,0,0,0.75);
margin-right: 8px;
display: table-cell;
vertical-align: middle;
}
.bboxvideo {
height: 214px;
border-radius: 4px;
border: 4px solid #FFFFFF;
color: #FFFFFF;
-moz-box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.75);
-webkit-box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.75);
box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.75);
margin-left: 8px;
display: table-cell;
vertical-align: middle;
}
.box_animation {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
background: url('http://www.yanlu.de/files/images/CloudBG.png');
-webkit-background-size: cover;
-webkit-transition-property: -webkit-transform;
-webkit-animation-name: scale;
-webkit-animation-duration: 40s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}