css实现菜单悬浮文字镂空填充动画效果代码

代码语言:html

所属分类:菜单导航

代码描述:css实现菜单悬浮文字镂空填充动画效果代码

代码标签: css 菜单 文字 镂空 填充 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        @import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&display=swap');
        * {
          box-sizing: border-box;
          padding: 0;
          margin: 0;
          font-family: 'Mochiy Pop One', sans-serif;
        }
        
        body {
          display: flex;
          justify-content: center;
          align-items: center;
          min-height: 100vh;
          background: #252839;
        }
        ul {
          position: relative;
          display: flex;
          flex-direction: column;
          gap: 30px;
        }
        ul li {
          position: relative;
          list-style: none;
        }
        ul li a {
          font-size: 4em;
          text-decoration: none;
          letter-spacing: 2px;
          line-height: 1em;
          text-transform: uppercase;
          color: transparent;
          -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
        }
        ul li a::before {
          content: attr(data-text);
          position: absolute;
          color: var(--clr);
          width: 0;
          overflow: hidden;
          trans.........完整代码请登录后点击上方下载按钮下载查看

网友评论0