<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<!--3.通过link标签,引入外部 1.css 文件的样式-->
<link rel="stylesheet" href="./css/1.css" >
<!--2.嵌入式引入样式,样式写在html文档中,head中的style标签内-->
<style>
div{
width: 150px;
height: 150px;
background-color: green;
}
</style>
</head>
<body>
<!--1. 行间添加属性style,设置样式-->
<!--<div style="width: 100px;height: 100px;background-color: red">-->
<div >
1111111
</div>
<!--优先级:-->
<!--距离标签越近,优先级越高-->
</body>
</html>
3种引入方式的优先级
最新推荐文章于 2022-09-18 19:35:18 发布
551

被折叠的 条评论
为什么被折叠?



