div+css实现彩色线条组成圆柱体旋转动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现彩色线条组成圆柱体旋转动画效果代码
代码标签: div css 彩色 线条 组成 圆柱体 旋转 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> section { display: grid; place-items: center end; transform: rotateX(0deg) rotateZ(30deg); transform-style: preserve-3d; perspective: 1000px; animation: rotate 10s linear infinite; } @keyframes rotate { 100% { transform: rotateX(360deg) rotateZ(30deg); } } section > * { grid-area: 1 / 1; } .circle { width: 8em; height: 12em; border: 0.2em solid; border-image: linear-gradient(to bottom, red, yellow, orange, blue) 1; transform-style: preserve-3d; transform-origin: center; transform: rotateY(calc(var(--i) * -9deg)); } * { 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.........完整代码请登录后点击上方下载按钮下载查看
网友评论0