css实现等距台阶动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现等距台阶动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } .container { width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center; background: #434750; overflow: hidden; } .steps { position: relative; transform: skewY(-15deg) translateX(50px) translateY(50px); animation: animateColor 2.5s linear infinite; } @keyframes animateColor { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } } .steps::before { content: ''; position: absolute; top: 300px; width: 300px; height: 200px; background: rgba(0, 0, 0, 0.1); z-index: 100; transform: skewX(45deg); transform-origin: bottom; filter: blur(20px); } .steps span { position: relative; width: 200px; height: 40px; display: block; background: #3e3f46; transition: 0.5s; z-index: var(--i); animation: animateSteps 5s ease-in-out infinite; animation-delay: calc(-1s * var(--i)); } @keyframes animateSteps { 0%,100% { transform: translateX(-70px); } 50% { transform: translateX(70px); } } .steps span:hover { background: #33a3ee; transition: 0.5s; } .steps span::be.........完整代码请登录后点击上方下载按钮下载查看
网友评论0