css布局实现星际飞船鼠标悬浮虹膜门打开关闭动画效果代码
代码语言:html
所属分类:悬停
代码描述:css布局实现星际飞船鼠标悬浮虹膜门打开关闭动画效果代码
代码标签: css 星际 飞船 鼠标 悬浮 虹膜门 打开 关闭
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; transform-style: preserve-3d; } body { margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; --spd: 2s; background: radial-gradient(circle at 50% 86%,black, #444); } .content { width: 100vmin; height: 100vmin; perspective: 35vmin; display: flex; align-items: center; justify-content: center; } .door { width: 100%; height: 100%; border-radius: 100%; position: relative; overflow: hidden; clip-path: circle(32% at 50% 50%); display: flex; align-items: center; justify-content: center; border-radius: 100%; border: 5px solid #333; } .door:before { content: ""; width: 200%; height: 200%; position: absolute; left: -50%; background-image: repeating-conic-gradient(#FFF9 0%, transparent .0004%, transparent .004%, transparent .074%), radial-gradient(ellipse at 20% 30%, #80008030, #181f46, #000000, #fff0, #fff0); animation: spin 500s linear 0s infinite; border-radius: 100%; } @keyframes spin { 100% { transform: rotate(360deg); } } .door:after { content: ""; position: absolute; width: 100%; height: 100%; box-sizing: border-box; border-radius: 100%; background: radial-gradient(#fff0 0 35%, #0e0e0e calc(35% + 1px), #343434 43% 45% , #2c2c2c 50% 100%); filter: drop-shadow(-2px -2px 5px #000a) drop-shadow(2px 2px 5px #000a); } .panel { position: absolute; width: 75vmin; height: 75vmin; border-radius: 100%; } .panel:before { --line1: #c17300; --line2: #1c1c1c; --screw1: #c17300 0.25vmin, #fff0 calc(0.25vmin + 3px) 100%; --screw2: #242424 0.45vmin, #.........完整代码请登录后点击上方下载按钮下载查看
网友评论0