div+css实现鼠标悬浮划线动画导航条效果代码

代码语言:html

所属分类:菜单导航

代码描述:div+css实现鼠标悬浮划线动画导航条效果代码

代码标签: div css 鼠标 悬浮 划线 动画 导航条

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

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">

    <style>
        @import url("https://fonts.googleapis.com/css?family=Varela+Round");
    html {
      box-sizing: border-box;
    }
    
    *, *:before, *:after {
      box-sizing: inherit;
      padding: 0;
      margin: 0;
    }
    
    body, html {
      width: 100%;
      height: 100%;
      background: #222;
      font-family: "Varela Round", sans-serif;
    }
    
    nav {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      max-width: 600px;
      height: 100%;
      margin: 0 auto;
    }
    
    nav a {
      text-decoration: none;
      font-size: 25px;
      color: #ddd;
      position: relative;
      margin-bottom: 50px;
      transition: all 0.2s;
      overflow: hidden;
    }
    
    nav a:hover {
      color: #fff;
    }
    
    nav a:last-child {
      margin-bottom: 0px;
    }
    
    nav a::before {
      content: "";
      posit.........完整代码请登录后点击上方下载按钮下载查看

网友评论0