a标签的简单应用

<!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>a标签</title>
    <style>
        a {
            display: block;
            width: 100px;
            height: 30px;
            background-color: gray;
            text-decoration: none;
            /* text-indent: 2em; */
            text-align: center;
            line-height: 30px;
        }

        a:hover {
            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>

 

上一篇:css圆角三角图表


下一篇:CSS盒子模型