css实现冰淇淋汽车行驶动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现冰淇淋汽车行驶动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html,body {
padding:0;
margin:0;
width:100%;
height:100%
}
.background-stuff {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
overflow:hidden;
background:#98c5e8;
animation:wrapperIn 2s
}
.background-stuff .bg {
position:absolute;
top:0;
left:-100%;
width:50%;
height:100%;
background:#636ed1;
-webkit-animation:bgIn 4s 0s linear infinite;
-moz-animation:bgIn 4s 0s linear infinite;
-ms-animation:bgIn 4s 0s linear infinite;
-o-animation:bgIn 4s 0s linear infinite;
animation:bgIn 4s 0s linear infinite;
-webkit-transform:skewX(10deg);
-moz-transform:skewX(10deg);
-ms-transform:skewX(10deg);
-o-transform:skewX(10deg);
transform:skewX(10deg);
z-index:1
}
.background-stuff .bg-2 {
background:#8faaff;
-webkit-animation:bgIn 4s 1s linear infinite;
-moz-animation:bgIn 4s 1s linear infinite;
-ms-animation:bgIn 4s 1s linear infinite;
-o-animation:bgIn 4s 1s linear infinite;
animation:bgIn 4s 1s linear infinite
}
.background-stuff .bg-3 {
background:#5a73da;
-webkit-animation:bgIn 4s 2s linear infinite;
-moz-animation:bgIn 4s 2s linear infinite;
-ms-animation:bgIn 4s 2s linear infinite;
-o-animation:bgIn 4s 2s linear infinite;
animation:bgIn 4s 2s linear infinite
}
.background-stuff .ground {
position:absolute;
bottom:0;
margin-bottom:-1.875em;
height:50%;
width:100%;
background:#ffc253;
z-index:2
}
.container {
height:100%;
width:100%;
display:table;
overflow:hidden
}
.container .car-wrapper {
display:table-cell;
vertical-align:middle;
width:100%
}
.car {
width:20em;
height:12.5em;
position:relative;
opacity:1;
margin-left:auto;
margin-right:auto;
z-index:4;
-webkit-animation:carMove .3s infinite;
-moz-animation:carMove .3s infinite;
-ms-animation:carMove .3s infinite;
-o-animation:carMove .3s infinite;
animation:carMove .3s infinite
}
.car .body {
positio.........完整代码请登录后点击上方下载按钮下载查看
网友评论0