CSS背景图像旋转

CSS背景图像旋转,css,background,rotation,Css,Background,Rotation,我在做旋转容器。 实际上我已经做了。。但是有一个问题:背景图像被分成两半(容器被分成两半) 代码是: @keyframes rotate-ornament { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); } } @-webkit-keyframes rotate-ornament { from { -webkit-transform

我在做旋转容器。 实际上我已经做了。。但是有一个问题:背景图像被分成两半(容器被分成两半)

代码是:

  @keyframes rotate-ornament {
  from {
  -webkit-transform: rotate(0deg);
  }
  to {
   -webkit-transform: rotate(360deg);
  }
  }
  @-webkit-keyframes rotate-ornament {
  from {
  -webkit-transform: rotate(0deg);
  }
  to {
  -webkit-transform: rotate(360deg);
  }
  }
  @-moz-keyframes rotate-ornament {
  from {
 -webkit-transform: rotate(0deg);
 }
 to {
 -webkit-transform: rotate(360deg);
 }
 }
 @-ms-keyframes rotate-ornament {
 from {
 -webkit-transform: rotate(0deg);
 }
 to {
 -webkit-transform: rotate(360deg);
 }
 }

.ornament {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
width:100%;
height:100%;
display:block;
z-index: -1;
}


.ornament {
background:transparent url('images/ornament.png') no-repeat;
background-size: 100%;
z-index: -1;
-moz-animation: rotate-ornament 100s linear infinite;
-ms-animation: rotate-ornament 100s linear infinite;
-o-animation: rotate-ornament 100s linear infinite;
-webkit-animation: rotate-ornament 100s linear infinite;
animation: rotate-ornament 100s linear infinite;
}

提前谢谢

问题是高度:100%


我将div“.endorry”(通过chrome inspector)的高度更改为背景图像的实际高度(1386px),效果很好。

我认为您必须尝试更详细地解释问题,因为我访问了链接,看不到问题发生在何处。我需要此图像(不剪切)在后台旋转。请在将来提供屏幕截图,以帮助其他用户,因为链接(如此链接)经常会断开。感谢您的评论:)在这种情况下(高度:1386px),它工作正常,但网站有大溢出。。我在想如何隐藏它