div+css实现三维线条旋转螺旋动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现三维线条旋转螺旋动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> section { display: grid; place-items: center end; width: 80vw; max-width: 500px; height: 25vw; transform: rotateX(-45deg) rotateY(0); transform-style: preserve-3d; animation: spin 20s linear infinite; } section > * { grid-area: 1 / 1; } @keyframes spin { 100% { rotate: y 360deg; } } .circle { width: 50%; height: 100%; border: 0.15em solid #66ff00; border-left-width: 1em; border-right-width: 0; border-radius: 50%; box-shadow: -0.5em 0 2.5em -0.5em blue; transform-origin: 0% 0%; transform: rotateY(calc(var(--i) * 18deg)); filter: brightness(1.2); } .circle:nth-child(even) { border-left-color: #ed9121; } * { padding: 0; margin: 0; box-sizing: border-box; } body { min-height: 100vh; display: grid; place-items: center; background: #290052; font-family: system-ui, sans-serif; font-size: calc(1rem + 1vw); line-height: 1; perspective: 500px; } img { max-width: 100%; object-fit: cover; } </style> </head> <body translate="no"> <section> <div class="circle" style="--i: 1;"></div> <div class="circle" style="--i: 2;"></div> <div class="circle".........完整代码请登录后点击上方下载按钮下载查看
网友评论0