Skip to content

Commit 2fef2b2

Browse files
committed
first commit
0 parents  commit 2fef2b2

26 files changed

+827
-0
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/JavaWeb code.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/03style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
div{
2+
border: 1px solid red;
3+
}
4+
sapn{
5+
border: 1px solid black;
6+
}

css/class选择器.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>class选择器</title>
6+
<style type="text/css">
7+
.class01{
8+
color: red;
9+
}
10+
11+
</style>
12+
13+
14+
</head>
15+
<body>
16+
<div class="class01">标签01</div>
17+
18+
19+
</body>
20+
</html>

css/css常用样式.html

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>css常用样式</title>
6+
7+
<style type="text/css">
8+
div{
9+
color: black;
10+
border: 1px solid red;
11+
width: 300px;
12+
height: 300px;
13+
background-color: white;
14+
font-size: 50px;
15+
16+
/*div居中:div整个标签相对于页面居中*/
17+
margin-right: auto;
18+
margin-left: auto;
19+
20+
/*文本居中*/
21+
text-align: center;
22+
23+
}
24+
25+
/*超链接祛下划线*/
26+
a{
27+
text-decoration: none;
28+
}
29+
30+
31+
table{
32+
border: 1px solid red; /*设置边框*/
33+
border-collapse: collapse; /*边框合并*/
34+
}
35+
td{
36+
border: 1px solid red;
37+
}
38+
39+
/*祛除列表前序号*/
40+
ul{
41+
list-style-type: none;
42+
}
43+
44+
45+
</style>
46+
47+
</head>
48+
<body>
49+
50+
<!--列表-->
51+
<ul>
52+
<li>111111111</li>
53+
<li>111111111</li>
54+
<li>111111111</li>
55+
</ul>
56+
57+
<!--表格-->
58+
<table>
59+
<tr>
60+
<td>1.1</td>
61+
<td>1.2</td>
62+
</tr>
63+
</table>
64+
65+
66+
<a href="https://www.baidu.com">百度</a>
67+
68+
<div>我是div标签</div>
69+
</body>
70+
</html>

css/id选择器.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>id选择器</title>
6+
<!--id选择器格式:
7+
#id号{
8+
属性:值;
9+
}
10+
-->
11+
12+
<style type="text/css">
13+
#id001{
14+
color: blue;
15+
font-size: 30px;
16+
border: 1px solid yellow;
17+
}
18+
#id002{
19+
color: red;
20+
font-size: 10px;
21+
border: 2px dashed black;
22+
}
23+
</style>
24+
25+
</head>
26+
<body>
27+
28+
<!--
29+
需求:
30+
分别定义两个div标签 :
31+
一个标签的id为id001,然后根据id属性定义css样式修改字体颜色为蓝色,字体大小为30个像素,边框为1像素黄色实线;
32+
另一个标签的id为id002,然后根据id属性定义css样式修改字体颜色为红色,字体大小为10个像素,边框为2像素黑色虚线;
33+
-->
34+
35+
<div id="id001">第一个标签</div> <!-- id的名字 首个不能是数字 必须为字母-->
36+
<div id="id002">第二个标签</div>
37+
</body>
38+
</html>

css/标签选择器.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>标签选择器</title>
6+
<!--标签名选择器-->
7+
<!--
8+
格式:标签名{
9+
属性:值;
10+
}
11+
-->
12+
<style type="text/css">
13+
div{
14+
color: blue;
15+
border: 1px solid yellow;
16+
font-size: 30px;
17+
}
18+
span{
19+
color: yellow;
20+
font-size: 20px;
21+
border: 5px dashed blue;
22+
}
23+
</style>
24+
</head>
25+
<body>
26+
<div>第1个标签</div>
27+
<div>第2个标签</div>
28+
<span>第3个标签</span>
29+
<span>第4个标签</span>
30+
</body>
31+
</html>

css/组合选择器.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>组合选择器</title>
6+
<style type="text/css">
7+
.class02,#id003{
8+
color: blue;
9+
font-size: 50px;
10+
}
11+
12+
.class02{
13+
border: 1px solid black;
14+
}
15+
16+
</style>
17+
</head>
18+
<body>
19+
<div class="class02">标签</div>
20+
<div id="id003">标签02</div>
21+
</body>
22+
</html>
23+
<!--使得不同的选择器可以共用相同的属性 将不同的属性另写 这样可以增强代码的复用性-->

0 commit comments

Comments
 (0)