div+css实现炫酷太阳光照射旋转开关效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现炫酷太阳光照射旋转开关效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { height: 100vh; background-image: linear-gradient(45deg, #555 10%, #888 90%); display: flex; justify-content: center; align-items: center; overflow: hidden; } .plate { position: fixed; left: 50%; top: 50%; width: 100vw; height: 0; padding-bottom: 100%; border-radius: 50%; transform: translate(-50%, -50%) rotate(0) scale(2); z-index: -1; background-image: repeating-conic-gradient(from 45deg at 50% 50%, #4a4 0deg 10deg, #5b5 10deg 20deg, #6c6 20deg 30deg); visibility: hidden; opacity: 0; } @keyframes rot { to { transform: translate(-50%, -50%) rotate(360deg) scale(2); } } input[type=checkbox] { display: none; } input[type=checkbox] ~ label { position: relative; display: block; width: 140px; height: 72px; border-radius: 40px; border: 4px solid #999; transition: transform 200ms cubic-bezier(0.41, -0.01, 0.63, 1.09); cursor: pointer; background: rgba(0, 0, 0, 0.3); } input[type=checkbox] ~ label::.........完整代码请登录后点击上方下载按钮下载查看
网友评论0