+ 这是我的个人介绍...
+From 799551073cc9e0440567164778d769877351f551 Mon Sep 17 00:00:00 2001 From: Kawaxxxsaki <1111@123.com> Date: Sun, 2 Nov 2025 19:13:40 +0800 Subject: [PATCH] =?UTF-8?q?docs(web):=20=E6=B7=BB=E5=8A=A0HTML=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E8=AF=AD=E6=B3=95=E7=AC=AC=E4=BA=8C=E8=AF=BE=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增HTML基础语法第二课文档,介绍div标签和class属性的基本概念及用法 --- .../programming/web/basic-syntax/html2.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 docs/notes/programming/web/basic-syntax/html2.md diff --git a/docs/notes/programming/web/basic-syntax/html2.md b/docs/notes/programming/web/basic-syntax/html2.md new file mode 100644 index 0000000..310f9a7 --- /dev/null +++ b/docs/notes/programming/web/basic-syntax/html2.md @@ -0,0 +1,144 @@ +--- +title: Web 前端基础第二课 +createTime: 2025/11/2 18:25:48 +permalink: /programming/web/basic-syntax/html2/ +--- + +## 认识div标签 + +**什么是
欢迎来到我的个人网站!
+
+这是我的个人介绍...
+ + + +``` + +所有元素都堆在一起,很难分别控制样式。 + +使用欢迎来到我的个人网站!
+
+ 这是我的个人介绍...
+普通段落
+个人介绍
+重要提示
+ + + + +``` + +如果我们想给"重要提示"和"重要按钮"设置特殊样式,很难精确选择!像之前我教的一样css直接用p或者h1来选择的话就无法区分具体每一段的区别了。 + +这时候就可以用class了! +::: code-tabs +@tab index.html +```html + + + + +普通段落
+个人介绍
+重要提示
+ + + + +``` +@tab style.css +```css +.warning { + color: red; + font-weight: bold; +} +.important-btn { + background-color: red; + color: white; +} +``` +**现在自己动手尝试一下** \ No newline at end of file