css实现落日傍晚汽车在马上上飞驰行驶动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现落日傍晚汽车在马上上飞驰行驶动画效果代码
代码标签: css 汽车 傍晚 落日 飞驰 行驶 马路 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> :root { --car-color: #ff2800; --window-color: #add8e6; --success-color: #2eff04; --error-color: #fd1c03; } html { background-color: #000; background-image: radial-gradient(ellipse at center, rgba(127, 0, 173, 0.4) 0%, black 90%); height: 100%; } *, *:after, *:before { box-sizing: border-box; } .wrapper { background-color: #000; background-image: radial-gradient(ellipse at center, rgba(127, 0, 173, 0.6) 0%, rgba(0, 0, 0, 0.8) 60%, black 90%); background-size: cover; border: 1px solid rgba(127, 0, 173, 0.6); box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); height: 600px; width: 800px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); position: absolute; overflow: hidden; -webkit-perspective: 50px; perspective: 50px; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; } .sun { position: absolute; border-radius: 50%; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); width: 12.5em; height: 12.5em; background: -webkit-gradient(linear, left top, left bottom, from(#f12711), to(yellow)); background: linear-gradient(#f12711, yellow); box-shadow: 0 0 30px #f5af19; } .grid { background: #010101; height: 60em; -webkit-transform: scale(1.4) rotateX(90deg); transform: scale(1.4) rotateX(90deg); position: absolute; width: 600%; margin-left: -250%; } .grid::after { -webkit-animation: 2.4s dash linear infinite; animation: 2.4s dash linear infinite; background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0px, rgba(54, 226, 248, 0.25) 0%, rgba(54, 226, 248, 0.25) 3px, rgba(0, 0, 0, 0) 0px), linear-gradient(90deg, rgba(0, 0, 0, 0) 0px, rgba(54, 226, 248, 0.5) 0%, rgba(54, 226, 248, 0.5) 3px, rgba(0, 0, 0, 0) 0px); background-size: 60px 60px, 60px 60px; background-color: rgba(2, 40, 45, 0.5); content: ""; width: 10%; height: 100%; position: absolute; bottom: 0; left: 50%; border: 2px solid rgba(54, 226, 248, 0.25); -webkit-transform: translateX(-50%); transform: translateX(-50%); } .car { -webkit-animation: 3s sway ease-in-out infinite; animation: 3s sway ease-in-out infinite; height: 180px; left: 50%; -webkit-perspective: 200px; perspective: 200px; position: absolute; width: 240px; top: 55.5%; margin-left: -120px; z-index: 2; } .car::before { -webkit-animation: 3s skew ease-in-out infinite; animation: 3s skew ease-in-out infinite; content: ""; width: 110%; height: 100%; background: rgba(0, 0, 0, 0.6); position: absolute; top: 75%; left: 50%; -webkit-transform: rotateX(60deg) translateX(-50%); transform: rotateX(60deg) translateX(-50%); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0