纯css图片分割3d旋转动画效果
代码语言:html
所属分类:动画
代码描述:纯css图片分割3d旋转动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <style> .flipper-grid { display: grid; width: 90vmin; height: 45vmin; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(5, 1fr); -webkit-perspective: 500px; perspective: 500px; } .flipper-grid .flipper { background: url("http://repo.bfw.wiki/bfwrepo/image/5d65ea7d8bc8b.png"); background-size: 90vmin; -webkit-animation: filp 3s ease-in-out infinite; animation: filp 3s ease-in-out infinite; } .flipper-grid .flipper:nth-child(1) { background-position-x: 0vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 7ms; animation-delay: 7ms; } .flipper-grid .flipper:nth-child(2) { background-position-x: -9vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 14ms; animation-delay: 14ms; } .flipper-grid .flipper:nth-child(3) { background-position-x: -18vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 21ms; animation-delay: 21ms; } .flipper-grid .flipper:nth-child(4) { background-position-x: -27vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 28ms; animation-delay: 28ms; } .flipper-grid .flipper:nth-child(5) { background-position-x: -36vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 35ms; animation-delay: 35ms; } .flipper-grid .flipper:nth-child(6) { background-position-x: -45vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 42ms; animation-delay: 42ms; } .flipper-grid .flipper:nth-child(7) { background-position-x: -54vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 49ms; animation-delay: 49ms; } .flipper-grid .flipper:nth-child(8) { background-position-x: -63vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 56ms; animation-delay: 56ms; } .flipper-grid .flipper:nth-child(9) { background-position-x: -72vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 63ms; animation-delay: 63ms; } .flipper-grid .flipper:nth-child(10) { background-position-x: -81vmin; background-position-y: calc(12.5% + 0vmin); -webkit-animation-delay: 70ms; animation-delay: 70ms; } .flipper-grid .flipper:nth-child(11) { background-position-x: -90vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 77ms; animation-delay: 77ms; } .flipper-grid .flipper:nth-child(12) { background-position-x: -99vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 84ms; animation-delay: 84ms; } .flipper-grid .flipper:nth-child(13) { background-position-x: -108vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 91ms; animation-delay: 91ms; } .flipper-grid .flipper:nth-child(14) { background-position-x: -117vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 98ms; animation-delay: 98ms; } .flipper-grid .flipper:nth-child(15) { background-position-x: -126vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 105ms; animation-delay: 105ms; } .flipper-grid .flipper:nth-child(16) { background-position-x: -135vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 112ms; animation-delay: 112ms; } .flipper-grid .flipper:nth-child(17) { background-position-x: -144vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 119ms; animation-delay: 119ms; } .flipper-grid .flipper:nth-child(18) { background-position-x: -153vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 126ms; animation-delay: 126ms; } .flipper-grid .flipper:nth-child(19) { background-position-x: -162vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 133ms; animation-delay: 133ms; } .flipper-grid .flipper:nth-child(20) { background-position-x: -171vmin; background-position-y: calc(12.5% + -9vmin); -webkit-animation-delay: 140ms; animation-delay: 140ms; } .flipper-grid .flipper:nth-child(21) { background-position-x: -180vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 147ms; animation-delay: 147ms; } .flipper-grid .flipper:nth-child(22) { background-position-x: -189vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 154ms; animation-delay: 154ms; } .flipper-grid .flipper:nth-child(23) { background-position-x: -198vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 161ms; animation-delay: 161ms; } .flipper-grid .flipper:nth-child(24) { background-position-x: -207vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 168ms; animation-delay: 168ms; } .flipper-grid .flipper:nth-child(25) { background-position-x: -216vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 175ms; animation-delay: 175ms; } .flipper-grid .flipper:nth-child(26) { background-position-x: -225vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 182ms; animation-delay: 182ms; } .flipper-grid .flipper:nth-child(27) { background-position-x: -234vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 189ms; animation-delay: 189ms; } .flipper-grid .flipper:nth-child(28) { background-position-x: -243vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 196ms; animation-delay: 196ms; } .flipper-grid .flipper:nth-child(29) { background-position-x: -252vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 203ms; animation-delay: 203ms; } .flipper-grid .flipper:nth-child(30) { background-position-x: -261vmin; background-position-y: calc(12.5% + -18vmin); -webkit-animation-delay: 210ms; animation-delay: 210ms; } .flipper-grid .flipper:nth-child(31) { background-position-x: -270vmin; background-position-y: calc(12.5% + -27vmin); -webkit-animation-delay: 217ms; animation-delay: 217ms; } .flipper-grid .flipper:nth-child(32) { background-position-x: -279vmin; background-position-y: calc(12.5% + -27vmin); -webkit-animation-delay: 224ms; animation-delay: 224ms; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0