前端学习笔记day02 CSS盒子模型

1. 制作导航栏:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        nav {
            height: 41px;
            background-color: #4c4c4c;
            border-top: 3px solid #FF8500;
            border-bottom: 1px #EDEEF0;
        }
        a {
            height: 41px;
            text-align: center;
            text-decoration: none;
            line-height: 41px;
            padding: 0px 15px;
        }
        a:hover {
            background-color: orange;
        }
    </style>
</head>
<body>
    <nav>
        <a href="#">首页</a>
        <a href="#">师资力量</a>
        <a href="#">联系我们哟</a>
        <a href="#">哈哈哈</a>
    </nav>
</body>
</html>

运行结果:

猜你喜欢

转载自www.cnblogs.com/xuanxuanlove/p/10046152.html