其他分享
首页 > 其他分享> > 简易的小米导航栏的制作HTML

简易的小米导航栏的制作HTML

作者:互联网

<!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>
        a {
            color: white;
            display: block;
            height: 40px;
            width: 230px;
            background-color: grey;
            font-size: 14px;
            text-decoration: none;
            text-indent: 2em;
            /* 文字行高等于盒子高度可以让文字居中显示 */
            line-height: 40px;
        }

        a:hover {
            background-color: orange;
        }
    </style>
</head>

<body>
    <a href="">手机 电话卡</a>
    <a href="">电视 盒子</a>
    <a href="">笔记本 平板</a>
    <a href="">出行 穿戴</a>
    <a href="">智能 路由器</a>
    <a href="">健康 儿童</a>
    <a href="">耳机 音响</a>
</body>

</html>

                                                                                            基础有限,仅供参考

标签:40px,盒子,color,text,height,简易,HTML,background,小米
来源: https://www.cnblogs.com/xushuaishuai/p/15808156.html