css实现三维格子变形动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现三维格子变形动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> *, *::before, *::after { padding: 0; margin: 0 auto; box-sizing: border-box; } body { background-image: radial-gradient(circle, #fff, #777 100vmin); min-height: 100vh; display: grid; place-items: center; perspective: 800px; overflow: hidden; } body *:not(:empty) { transform-style: preserve-3d; } .scene { position: relative; -webkit-animation: scene 20s infinite linear; animation: scene 20s infinite linear; } @-webkit-keyframes scene { from { transform: rotate(0deg) rotateX(30deg) rotate(360deg); } to { transform: rotate(360deg) rotateX(30deg) rotate(0deg); } } @keyframes scene { from { transform: rotate(0deg) rotateX(30deg) rotate(360deg); } to { transform: rotate(360deg) rotateX(30deg) rotate(0deg); } } .auxetic { position: relative; font-size: 5vmin; width: 2em; aspect-ratio: 1; -webkit-animation-name: auxetic; animation-name: auxetic; --background-color: #fff; } @-webkit-keyframes auxetic { 0% { transform: rotate(0deg) scale(1); } 25% { transform: rotate(-22.5deg) scale(0.95); } 50% { transform: rotate(-45deg) scale(0.9); } 75% { transform: rotate(-67.5deg) scale(0.95); } 100% { transform: rotate(-90deg) scale(1); } } @keyframes auxetic { 0% { transform: rotate(0deg) scale(1); } 25% { transform: rotate(-22.5deg) scale(0.95); } 50% { transform: rot.........完整代码请登录后点击上方下载按钮下载查看
网友评论0