纯css实现火车入隧道动画效果代码
代码语言:html
所属分类:动画
代码描述:纯css实现火车入隧道动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
height: 100vh;
position: relative;
background-color: #9370db;
text-align: center;
overflow: hidden;
}
div {
position: absolute;
}
div:before,
div:after {
display: block;
content: '';
position: absolute;
}
#train {
width: 60%;
height: 100%;
top: auto;
left: auto;
right: 0;
bottom: 0;
background-repeat: no-repeat, no-repeat, repeat-x, repeat-x, repeat-x, repeat, repeat, repeat, repeat, repeat, no-repeat;
background-image: -webkit-gradient(linear, left top, right top, color-stop(11em, #ccc), color-stop(11em, #999), color-stop(12em, #999), color-stop(12em, transparent)), -webkit-gradient(linear, left top, left bottom, color-stop(20%, #dc143c), color-stop(20%, #ffd700), color-stop(40%, #ffd700), color-stop(40%, #20b2aa), color-stop(60%, #20b2aa), color-stop(60%, #1e90ff), color-stop(80%, #1e90ff), color-stop(80%, #da70d6)), -webkit-gradient(linear, right top, left top, color-stop(2%, #aaa), color-stop(2%, #555)), -webkit-gradient(linear, right top, left top, color-stop(2%, #888), color-stop(2%, #333)), -webkit-gradient(linear, right top, left top, color-stop(2%, #444), color-stop(2%, #c0c0c0)), radial-gradient(circle at 40% 20%, rgba(255,255,255,0.4) 0.1em, rgba(255,255,255,0) 0.11em), radial-gradient(circle .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0