div+css实现音符checkbox开关效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现音符checkbox开关效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; margin: 0; min-height: 100vh; font-size: 4em; gap: 0.5em; } .music { appearance: none; position: relative; font-size: 1em; border: max(1px, 0.05em) solid #000; width: 3em; aspect-ratio: 3; border-radius: 3em; background: #ccc; &::before { content: ""; position: absolute; width: 100%; height: 100%; border-radius: 3em; background: linear-gradient(#000 0 0) 17.65% 58% / 0.03em 0.475em, radial-gradient(10% 20% at 15% 80%, #000 0.1em, #0000 0), linear-gradient(#000 0 0) 34.25% 58% / 0.03em 0.475em, radial-gradient(10% 20% at 31.5% 80%, #000 0.1em, #0000 0), linear-gradient(#000 0 0) 52% 43% / 0.03em 0.475em, radial-gradient(10% 20% at 49% 72.5%, #000 0.1em, #0000 0), linear-gradient(#000 0 0) 68.65% 30% / 0.03em 0.475em, radial-gradient(10% 20% at 65.5% 65%, #000 0.1em, #0000 0), linear-gradient(#000 0 0) 87.35% 30% / 0.03em 0.475em, radial-gradient(10% 20% at 84% 65%, #000 0.1em, #0000 0), /* pentagram */ repeating-linear-gradient(#ccc 0 0) 0 20% / 100% 0.035em, repeating-linear-gradient(#ccc 0 0) 0 35% / 100% 0.035em, repeati.........完整代码请登录后点击上方下载按钮下载查看
网友评论0