1 Star 0 Fork 0

白龙马 / HTML-CSS-JS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
5CSS导入方式.html 1016 Bytes
一键复制 编辑 原始数据 按行查看 历史
白龙马 提交于 2024-02-23 08:28 . 第一次上传gitee十四
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/style.css">
<title>5 CSS 导入方式</title>
<style>
p {
color: blue;
font-size: 36px;
}
h2 {
color: red;
}
</style>
</head>
<body>
<h1>5 CSS 导入方式</h1>
<h2>1.内联样式 &ltp style="color:red"></p></h2>
<p style="color:red">p标签应用了内联样式</p>
<h2>2.内部样式表,html页面内定义&ltstyle></h2>
<p>p标签应用了内部样式表</p>
<h1 style="color:brown">h1标签应用了内联样式</h1>
<h2>h2标签应用了内部样式表</h2>
<h2>3.外部样式表,&ltlink rel="stylesheet" href="./css/style.css"></h2>
<h3>h3标签应用了外部样式表</h3>
CSS的优先级:内联样式 > 内部样式表 > 外部样式表
</body>
</html>
HTML
1
https://gitee.com/blma/html-css-js.git
git@gitee.com:blma/html-css-js.git
blma
html-css-js
HTML-CSS-JS
master

搜索帮助