div+css实现魔眼phi旋转闭合动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现魔眼phi旋转闭合动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .eye { box-sizing: border-box; transform: rotate(45deg); background-color: rgba(29, 143, 201, 0.1); width: 70vmin; aspect-ratio: 1; border: 1px solid #1f202020; border-radius: 100% 0; position: relative; overflow: clip; animation: 6s spin infinite ease-in-out alternate; } .eye > .eye { top: 50%; left: 50%; width: 100%; height: 85%; position: absolute; transform: translatex(-50%) translatey(-50%) rotate(calc(var(--off, 5) * 1deg)); } @property --off { syntax: "<number>"; inherits: true; initial-value: 3; } @keyframes spin { 0% { --off: -36; } 100% { --off: 36; } } body { min-height: 100vh; margin: 0; display: grid; grid-template-rows: auto 1fr; place-content: center; overflow: clip; background-color: #F5F5F0; font-family: system-ui, sans-serif; } h1 { text-align: center; } </style> </head> <body translate="no"> <h1>PHI</h1> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> <div class="eye"> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0