css+svg实现宇宙行星旋转甩开loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css+svg实现宇宙行星旋转甩开loading加载动画效果代码
代码标签: css svg 宇宙 行星 旋转 甩开 loading 加载 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .game-loader { width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #273355; } .game-loader__btn { position: fixed; outline: none; min-width: 16vw; min-height: 4vw; bottom: 10vh; z-index: 10001; background: transparent; border: 2px solid #11DBD9; border-radius: 25px; color: white; cursor: pointer; padding: 0.5em 1em; transition: 1s; } .game-loader__btn:hover { background: #11DBD9; } .game-loader__planet { filter: url("#goo"); position: relative; width: 100vw; height: 100vw; } .game-loader__planet::after { content: ""; display: block; width: 8vw; height: 8vw; border-radius: 50%; background: #11DBD9; box-shadow: #11DBD9 0 0 24px 4px; margin: 0 auto; position: absolute; top: 46vw; left: 46vw; -webkit-animation: scale 16s linear infinite, color5 8s linear 1; animation: scale 16s linear infinite, color5 8s linear 1; } .game-loader__planet .loader-mini1 { position: absolute; width: 3vw; height: 3vw; border-radius: 50%; background: #11DBD9; top: 48.5vw; left: 48.5vw; -webkit-animation: move1 8s linear 1, color1 8s linear 1; animation: move1 8s linear 1, color1 8s linear 1; } .game-loader__planet .loader-mini2 { position: absolute; width: 3.6vw; height: 3.6vw; border-radius: 50%; background: #11DBD9; top: 48.5vw; left: 48.5vw; -webkit-animation: move2 9s linear 1, color2 9s linear 1; animation: move2 9s linear 1, color2 9s linear 1; } .game-loader__planet .loader-mini3 { position: absolute; width: 4.2vw; height: 4.2vw; border-radius: 50%; background: #11DBD9; top: 48.5vw; left: 48.5vw; -webkit-animation: move3 10s linear 1, color3 10s linear 1; animation: move3 10s linear 1, color3 10s linear 1; } .game-loader__planet .loader-mini4 { position: absolute; width: 4.8vw; height: 4.8vw; border-radius: 50%; background: #11DBD9; top: 48.5vw; left: 48.5vw; -webkit-animation: move4 11s linear 1, color4 11s linear 1; animation: move4 11s linear 1, color4 11s linear 1; } .game-loader__planet .loader-radius1 { position: absolute; width: 12vw; height: 12vw; border-radius: 50%; border: 0.5px solid #11DBD9; opacity: 0.2; background: transparent; top: 44vw; left: 44vw; transform: scale(0); -webkit-animation: orbit1 8s linear 1; animation: orbit1 8s linear 1; } .game-loader__planet .loader-radius2 { position: absolute; width: 18vw; height: 18vw; border-radius: 50%; border: 0.5px solid #11DBD9; opacity: 0.2; background: transparent; transform: scale(0); top: 41vw; left: 41vw; -webkit-animation: orbit2 9s linear 1; animation: orbit2 9s linear 1; } .game-loader__planet .loader-radius3 { position: absolute; width: 24vw; height: 24vw; border-radius: 50%; border: 0.5px solid #11DBD9; opacity: 0.2; background: transparent; transform: scale(0); top: 38vw; left: 38vw; -webkit-animation: orbit3 10s linear 1; animation: orbit3 10s linear 1; } .game-loader__planet .loader-radius4 { position: absolute; width: 30vw; height: 30vw; border-radius: 50%; border: 0.5px solid #11DBD9; opacity: 0.2; background: transparent; transform: scale(0); top: 35vw; left: 35vw; -webkit-animation: orbit4 11s linear 1; animation: orbit4 11s linear 1; } .game-loader__planet--color .loader-mini1 { background: #0fc3c2; } .game-loader__planet--color .loader-mini2 { background: #0dacaa; } .game-loader__planet--color .loader-mini3 { background: #0b9493; } .game-loader__planet--color .loader-mini4 { background: #0a7c7b; } .btn-play { left: 41vw; } @-webkit-keyframes move1 { 0% { transform: skewX(5deg) rotate(0deg) translateY(0em) rotate(0deg) skewX(-5deg) rotate(0deg); } 10% { transform: skewX(5deg) rotate(180deg) translateY(-6vw) rotate(-180deg) skewX(-5deg) rotate(180deg); } 25% { transform: skewX(5deg) rotate(360deg) translateY(-12vw) rotate(-360deg) skewX(-5deg) rotate(360deg); } 50% { transform: skewX(5deg) rotate(720deg) translateY(-12vw) rotate(720deg) skewX(-5deg) rotate(720deg); } 75% { transform: skewX(5deg) rotate(1080deg) translateY(-12vw) rotate(-1080deg) skewX(-5deg) rotate(1080deg); } 90% { transform: skewX(5deg) rotate(1260deg) translateY(-6vw) rotate(-1260deg) skewX(-5deg) rotate(1260deg); } 100% { transform: skewX(5deg) rotate(1440deg) translateY(0em) rotate(-1440deg) skewX(-5deg) rotate(1440deg); } } @keyframes move1 { 0% { transform: skewX(5deg) rotate(0deg) translateY(0em) rotate(0deg) skewX(-5deg) rotate(0deg); } 10% { transform: skewX(5deg) rotate(180deg) translateY(-6vw) rotate(-180deg) skewX(-5deg) rotate(180deg); } 25% { transform: skewX(5deg) rotate(360deg) translateY(-12vw) rotate(-360deg) skewX(-5deg) rotate(360deg); } 50% { transform: skewX(5deg) rotate(720deg) translateY(-12vw) rotate(720deg) skewX(-5deg) rotate(720deg); } 75% { transform: skewX(5deg) rotate(1080deg) translateY(-12vw) rotate(-1080deg) skewX(-5deg) rotate(1080deg); } 90% { transform: skewX(5deg) rotate(1260deg) translateY(-6vw) rotate(-1260deg) skewX(-5deg) rotate(1260deg); } 100% { transform: skewX(5deg) rotate(1440deg) translateY(0em) rotate(-1440deg) skewX(-5deg) rotate(1440deg); } } @-webkit-keyframes move2 { 0% { transform: skewX(5deg) rotate(0deg) translateY(0em) rotate(0deg) skewX(-5deg) rotate(0deg); } 10% { transform: skewX(5deg) rotate(180deg) translateY(-9vw) rotate(-180deg) skewX(-5deg) rotate(180deg); } 25% { transform: skewX(5deg) rotate(360deg) translateY(-18vw) rotate(-360deg) skewX(-5deg) rotate(360deg); } 50% { transform: skewX(5deg) rotate(720deg) translateY(-18vw) rotate(720deg) skewX(-5deg) rotate(720deg); } 75% { transform: skewX(5deg) rotate(1080deg) translateY(-18vw) rotate(-1080deg) skewX(-5deg) rotate(1080deg); } 90% { transform: skewX(5deg) rotate(1260deg) translateY(-9vw) rotate(-1260deg) skewX(-5deg) rotate(1260deg); } 100% { transform: skewX(5deg) rotate(1440deg) translateY(0em) rotate(-1440deg) skewX(-5deg) rotate(1440deg); } } @keyframes move2 { 0% { transform: skewX(5deg) rotate(0deg) translateY(0em) rotate(0deg) skewX(-5deg) rotate(0deg); } 10% { transform: skewX(5deg) rotate(180deg) translateY(-9vw) rotate(-180deg) skewX(-5deg) rotate(180deg); } 25% { transform: skewX(5deg) rotate(360deg) translateY(-18vw) rotate(-360deg) skewX(-5deg) rotate(360deg); } 50% { transform: skewX(5deg) rotate(720deg) translateY(-18vw) rotate(720deg) skewX(-5deg) rotate(720deg); } 75% { transform: skewX(5deg) rotate(1080deg) translateY(-18vw) rotate(-1080deg) skewX(-5deg) rotate(1080deg); } 90% { transform: skewX(5deg) rotate(1260deg) translateY(-9vw) rotate(-1260deg) skewX(-5deg) rotate(1260deg); } 100% { transform: skewX(5deg) rotate(1440deg) translateY(0em) rotate(-1440deg) skewX(-5deg) rotate(1440deg); } } @-webkit-keyframes move3 { 0% { transform: skewX(5deg) rotate(0deg) translateY(0em) rotate(0deg) skewX(-5deg) rotate(0deg); } 10% { transform: skewX(5deg) rotate(180deg) translateY(-12vw) rotate(-180deg) skewX(-5deg) rotate(180deg); } 25% { transform: skewX(5deg) rotate(360deg) translateY(-24vw) rotate(-360deg) skewX(-5deg) rotate(360deg); } 50% { transform: skewX(5deg) rotate(720deg) translateY(-24vw) rotate(720deg) skewX(-5deg) rotate(720deg); } 75% { transform: skewX(5deg) rotate(1080deg) translateY(-24vw) rotate(-1080deg) skewX(-5deg) rotate(1080deg); } 90% { transform: skewX(5deg) rotate(1260deg) translateY(-12vw) rotate(-1260deg) skewX(-5deg) rotate(1260deg); } 100% { transform: skewX(5deg) rotate(1440deg) translateY(0em) rotate(-1440deg) skewX(-5deg) rotate(1440deg); } } @keyframes move3 { 0% { transform: skewX(5deg) rotate(0deg) translateY(0em) rotate(0deg) skewX(-5deg) rotate(0deg); } 10% { transform: skewX(5deg) rotate(180deg) translateY(-12vw) rotate(-180deg) skewX(-5deg) rotate(180deg); } 25% { transform: skewX(5deg) rotate(360deg) translateY(-24vw) rotate(-360deg) skewX(-5deg) rotate(360deg); } 50% { transform: skewX(5deg) rotate(720deg) translateY(-24vw) rotate(720deg) skewX(-5deg.........完整代码请登录后点击上方下载按钮下载查看
网友评论0