div+css实现按钮悬浮霓虹灯效果代码
代码语言:html
所属分类:悬停
代码描述:div+css实现按钮悬浮霓虹灯效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> :root { --clr-neon: hsl(269, 100%, 55%); --clr-bg: hsl(0, 0%, 0%); } *, *::before, *::after { box-sizing: border-box; } body { min-height: 100vh; display: grid; place-items: center; background: var(--clr-bg); font-family: "Balsamiq Sans", cursive; color: var(--clr-neon); padding-right: -01rem; } .neon-button { font-size: 4rem; display: inline-block; cursor: pointer; text-decoration: none; color: var(--clr-neon); border: var(--clr-neon) 0.125em solid; padding: 0.25em 1em; border-radius: 0.25em; text-shadow: 0 0 0.125em hsl(0 0% 100% / 0.3), 0 0 0.45em currentColor; box-shadow: inset 0 0 0.5em 0 var(--clr-neon), 0 0 0.5em 0 var(--clr-neon); position: relative; } .neon-button::before { pointer-events: none; content: ""; position: absolute; background: var(--clr-neon); top: 120%; left: 0; w.........完整代码请登录后点击上方下载按钮下载查看
网友评论0