svg+css实现悬浮模糊菜单选择单选效果代码
代码语言:html
所属分类:菜单导航
代码描述:svg+css实现悬浮模糊菜单选择单选效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <style> body{ padding: 100px; background: black; } .input { display: flex; flex-direction: column; width: 200px; background-color: #0D1117; justify-content: center; border-radius: 5px } .value { background-color: transparent; border: none; padding: 10px; color: white; display: flex; position: relative; gap: 5px; cursor: pointer; border-radius: 4px; } .value:not(:active):hover, .value:focus { background-color: #21262C; } .value:focus, .value:active { background-color: #1A1F24; outline: none; } .value::before { content: ""; position: absolute; top: 5px; left: -10px; width: 5px; height: 80%; background-color: #2F81F7; border-radius: 5px; opacity: 0; } .value:focus::before, .value:active::before { opacity: 1; } .value svg { width: 15px } .input:hover > :not(.value:hover) { transition: 300ms; filter: blur(1px); transform: scale(0.95,0.95); } </style> </head> <body> <div class="input"> <button class="value"> <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" data-name="La.........完整代码请登录后点击上方下载按钮下载查看
网友评论0