-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
176 lines (173 loc) · 4.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>学习CSS 3的新特性</title>
<style>
* {
margin: 0;
padding: 0;
}
.one {
text-align: left;
}
.one .top {
background-color: black;
color: white;
font-weight: bold;
}
.one table>tbody>tr:nth-child(even) {
background-color: grey;
}
.one table>tbody>tr:nth-child(-n+3){
color: red;
}
.two input {
width: 200px;
transition: width .25s ease-in;
}
.two input:focus {
width: 300px;
transition: width .25s ease-in;
}
.three {
position: relative;
overflow: hidden;
}
.three ul{
position: relative;
height: 200px;
transition: left .25s ease-in;
}
.three .item {
width: 300px;
height: 200px;
}
.three ul li {
list-style: none;
float: left;
}
.three .item-1 {
background-color: yellow;
}
.three .item-2 {
background-color: blue;
}
.three .item-3 {
background-color: red;
}
.three .tab ul {
position: absolute;
top: 160px;
left: 200px;
}
.three .tab ul label {
background-color: black;
margin-right: 2px;
width: 30px;
height: 30px;
line-height: 30px;
color: white;
text-align: center;
cursor: pointer;
}
#b1:checked~ul {
left: 0;
}
#b2:checked~ul {
left: -300px;
}
#b3:checked~ul {
left: -600px;
}
</style>
</head>
<body>
<h1>demo1</h1>
<div class="demo one">
<table>
<thead>
<tr class="top">
<th>排名</th>
<th>网站</th>
<th>热度</th>
</tr>
</thead>
<tbody>
<tr>
<th>1.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>2.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>3.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>4.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>5.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>6.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>7.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>8.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>9.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
<tr>
<th>10.</th>
<th>百度前端技术学院</th>
<th>13000</th>
</tr>
</tbody>
</table>
</div>
<div class="demo two">
<h1>demo2</h1>
<input type="text">
</div>
<h1>demo3</h1>
<div class="demo three">
<input type="radio" id="b1" name="t" checked="checked">
<input type="radio" id="b2" name="t">
<input type="radio" id="b3" name="t">
<ul>
<li class="item item-1"></li>
<li class="item item-2"></li>
<li class="item item-3"></li>
</ul>
<div class="tab">
<ul>
<label class="tab-1" for="b1">1</label>
<label class="tab-1" for="b2">2</label>
<label class="tab-1" for="b3">3</label>
</ul>
</div>
</div>
</body>
</html>