first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
h2 {
color: blue;
}

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./index.css">
<title>CSS学习第一课</title>
<style>
h2 {
color: yellow;
}
.nihao p a {
color: red;
}
#xk {
font-size: 50px;
}
.a+p {
font-size: 30px;
}
</style>
</head>
<body>
<div class="a"></div>
<p>dfewfew</p>
<h2 class="nihao">
<p>
<a href="">
你好
</a>
</p>
</h2>
<p>熊坤</p>
<a>熊坤</a>
</body>
</html>

View File

@@ -0,0 +1,44 @@
1css: 层叠样式表
2写法
1内联写法就是讲css代码写在html标签内部
<h2 style="color:red">你好</h2>
2内部写法将代码放在head里面和html代码脱离
<style>
h2 {
coloe:red;
}
</style>
选择器 {
属性名: 属性值;
}
3外部(外链)写法
<link rel="stylesheet" href="./index.css">
权重(优先应用css代码的等级)1 > 2 > 3
想改变默认的规则: !important
3选择器学习
class(类选择器 “ . ”): 可以无限重复
id(" # "): 用id选择器的元素是全局唯一存在的不要出现重复
标签选择器:
* 通配符选择器 用途:清除浏览器默认样式
+ 选择莫个元素之后的同级元素
> 选中莫个父元素里面的子元素
, 同时选中多个元素
a 空格 b 选中莫个父元素里面的子元素