当前位置:网站首页>A label colorful navigation bar

A label colorful navigation bar

2022-07-05 01:49:00 dengfengling999

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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .nav a {
            display: inline-block;
            width: 120px;
            height: 58px;
            background-color: green;
            text-align: center;
            /*  Text horizontal center  */
            line-height: 58px;
            /*  Want to center text vertically , Set the row height equal to the box Height  */
            color: #fff;
            text-decoration: none;
        }

        .nav .bg1:hover {
            background-color: hotpink;
            color: orange;
            text-decoration: underline;
        }

        .nav .bg2:hover {
            background-color: red;
        }

        .nav .bg3:hover {
            background-color: orange;
        }

        .nav .bg4:hover {
            background-color: palegoldenrod;
        }

        .nav .bg5:hover {
            background-color: palegreen;
        }
    </style>
</head>

<body>
    <div class="nav">
        <a href="#" class="bg1"> Colorful navigation </a>
        <a href="#" class="bg2"> Colorful navigation </a>
        <a href="#" class="bg3"> Colorful navigation </a>
        <a href="#" class="bg4"> Colorful navigation </a>
        <a href="#" class="bg5"> Colorful navigation </a>
    </div>

</body>

</html>

result :

 

 

原网站

版权声明
本文为[dengfengling999]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141011560350.html