html通过link标签引入css

1.css文件:

div{
    border: 1px solid red;
}
span{
    border: 4px solid green;
}

html文件:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--link标签专门用来引入css样式代码-->
    <link rel="stylesheet" type="text/css" href="1.css"/>
</head>
<body>
    <div>div标签1</div>
    <div>div标签2</div>
    <div>div标签2</div>
    <div>div标签2</div>
    <div>div标签2</div>
    <div>div标签2</div>
    <span>span标签1</span>
    <span>span标签2</span>
    <span>span标签2</span>
    <span>span标签2</span>
    <span>span标签2</span>
</body>
</html>
上一篇:单链表的设计


下一篇:学习stm32单片机,必备工具和软件,你知道几个?