CSS样式
//背景图全屏显示
body {
content: ' ';
z-index: -1;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(../images/bg.png) center 0 no-repeat;
background-size: cover;
}
body:before{
content: ' ';
position: fixed;
z-index: -1;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(../images/bg.png) center 0 no-repeat;
background-size: cover;
}
//head图片
.headImg {
content: ' ';
position: fixed;
z-index: 3;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(../images/bg.png) center 0 no-repeat;
background-size: 100%;
}
顺时针旋转
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
.Rotation {
-webkit-transform: rotate(360deg);
animation: rotation 1s linear infinite;
-moz-animation: rotation 1s linear infinite;
-webkit-animation: rotation 1s linear infinite;
-o-animation: rotation 1s linear infinite;
}