纯css实现菜单底部悬停下划线动画

代码语言:html

所属分类:菜单导航

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title> Menu Hover Underline</title>
    <style>

        body {
            display: flex;
            height: 100vh;
            justify-content: center;
            align-items: center;
            text-align: center;
            background: #222;
        }

        ul {
            display: flex;
            flex-direction: column;
            list-style-type: none;
        }
        ul li {
            align-self: flex-start;
            padding: 6px 0;
        }
        ul li a {
            position: relative;
            display: block;
            text-decoration: none;
            font-family: "Lato";
            color: #ecf0f1;
            text-transform: uppercase;
            padding: 4px 0;
            transition: 0.5s;
        }
        ul li a::after {
            position: absolute;
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0