悬浮特效按钮
代码语言:html
所属分类:悬停
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> Paint Drop Hover</title> <link href="https://fonts.googleapis.com/css?family=Heebo:700&display=swap" rel="stylesheet"> <style> html, body { height: 100%; } html { font-size: 62.5%; } body { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: #202020; } .font-style { font-family: 'Heebo', sans-serif; font-size: 9rem; font-weight: 700; line-height: 1; text-stroke: 0.1rem rgba(255,255,255, 0.5); -webkit-text-stroke: 0.1rem rgba(255,255,255, 0.5); white-space: nowrap; /* Unfortunately letter-spacing and text-length don't line up with HTML text across the different browsers... */ /* ...so you're forced to just leave the letter spacing as is. */ } button { margin: 0; padding: 8px 19px 0 16px; border: 0; background: none; cursor: pointer; color: transparent; position: relative; overflow: hidden; } svg { position: absolute; top: 0; left: 0; overflow: hidden; border-radius: 1px; width: 100%; height: 100%; } </style> </head> <body translate="no"> <button class="font-style"> Hover Me <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 426 98"> <defs> <mask id="mask"> <circle class="mask" r="0" fill="#fff" cx="0" cy="50" /> </mask> </defs> <g id="toBeRevealed" mask="url(#mask)"> <linearGradient id="gradient"> <stop stop-color="#fc0f47" offset="0%" /> <stop stop-color="#9b040c" off.........完整代码请登录后点击上方下载按钮下载查看
网友评论0