希望有人能告诉我,如果这是可能的旋转HTML正文背景
我有Opencart的一个网站的背景是一个“土”的图片,我想让它转动它的Z轴动画它,所以它顺时针旋转。
body {
background:url('../image/bg.jpg') repeat;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
margin: 0px;
padding: 0px;
}
这是CSS设置的背景,我找到了这块但我看到我无法引用背景属性?不知道,但这是我基本上想要身体的背景属性。
.image {
position: absolute;
top: 50%;
left: 50%;
width: 120px;
height: 120px;
margin:-60px 0 0 -60px;
-webkit-animation:spin 8s linear infinite;
-moz-animation:spin 8s linear infinite;
animation:spin 8s linear infinite;
}
@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg);
ransform:rotate(360deg); } }
这是否可以旋转HTML页面的背景图像?
你有没有尝试设置'变换:旋转(0deg);'在类图像配下手?那么它有两个值之间的动画? – JosephGarrone
它旋转图像,如果我有 user2870429
You cannot rotate a background-image. You might be able to rotate an element (not the body) but an absolutely positioned div...that you could rotate. –