div+js实现彩色圆点旋转交汇翻转loading加载动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:div+js实现彩色圆点旋转交汇翻转loading加载动画效果代码
代码标签: div js 彩色 圆点 旋转 交汇 翻转 loading 加载 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } :root { --space-black: #0a0a0a; --cosmic-blue: #1e90ff; --nebula-purple: #9370db; --star-yellow: #ffd700; --orbit-size: 180px; } body { min-height: 100vh; display: flex; justify-content: center; align-items: center; background: var(--space-black); perspective: 1000px; } .cosmic-loader { position: relative; width: var(--orbit-size); height: var(--orbit-size); transform-style: preserve-3d; animation: rotate-loader 8s linear infinite; } .orbit { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.1); transform-style: preserve-3d; } .orbit:nth-child(1) { transform: rotateX(60deg) rotateY(10deg); } .orbit:nth-child(2) { transform: rotateX(-45deg) rotateY(30deg); } .orbit:nth-child(3) { transform: rotateX(30deg) rotateY(-20deg); } .satellite { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--cosmic-blue); transform: translate(-50%, -50%); animation: orbit-animation 3s linear infinite; box-shadow: 0 0 15px var(--cosmic-blue); } .orbit:nth-child(2) .satellite { background: var(--nebula-purple); box-shadow: 0 0 15px var(--nebula-purple); animation-duration: 4s; animation-delay: -1s; } .orbit:nth-child(3) .satellite { background: var(--star-yellow); box-shadow: 0 0 15px var(--star-yellow); animation-duration: 5s; animation-delay: -2s; } .core { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: radial-gradient(circle at 30% 30%, #ffffff, var(--cosmic-blue)); border-radius: 50%; box-shadow: 0 0 30px var(--cosmic-blue); animation: pulse 2s ease-in-out infinite; } .stars { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .star { position: absolute; width: 2px; height: 2px; background: white; border-radius: 50%; animation: twinkle var(--twinkle-duration) ease-in-out infinite; } @keyframes rotate-loader { 0% { transform: rotateY(0deg); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0