-
Notifications
You must be signed in to change notification settings - Fork 1
/
CSS_Selector.html
282 lines (239 loc) · 8.22 KB
/
CSS_Selector.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<title>CSS 选择器</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/night.css" id="theme">
<link rel="stylesheet" href="lib/css/zenburn.css">
<style>
.authorArea {
margin-top: 100px !important;
text-align: right;
font-size: 90% !important;
}
section {
text-align: left;
}
pre {
margin: 0px !important;
font-size: 105% !important;
}
code {
font-family: cursive !important;
}
small {
font-size: .8em !important;
margin: 10px 0px !important;
}
ul {
margin: 10px 0px !important;
list-style: none !important;
}
.box {
background: #ccc;
border-radius: 10px;
margin: 10px;
}
.shadow {
position: relative;
max-width: 270px;
box-shadow: 0px 1px 4px rgba(0,0,0,0.3),
0px 0px 20px rgba(0,0,0,0.1) inset;
}
.shadow::before,
.shadow::after {
content:"";
position:absolute;
z-index:-1;
}
.shadow::before,
.shadow::after {
content:"";
position:absolute;
z-index:-1;
bottom:15px;
left:10px;
width:50%;
height:20%;
}
.shadow::before,
.shadow::after {
content:"";
position:absolute;
z-index:-1;
bottom:15px;
left:10px;
width:50%;
height:20%;
box-shadow:0 15px 10px #ddd;
transform:rotate(-6deg);
}
.shadow::after{
right:10px;
left:auto;
transform:rotate(6deg);
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h2>CSS 选择器</h2>
<div class="authorArea">
<p>By Hao Ju Zheng</p>
<p>github: <a href="https://github.com/hjzheng">https://github.com/hjzheng</a></p>
</div>
</section>
<section>
<h2>什么是CSS选择器?</h2>
</section>
<section>
<h2>CSS语法(1)</h2>
<img src="img/css_s1.png" class="box shadow">
</section>
<section>
<h2>CSS语法(2)</h2>
<img src="img/css_s2.png" class="box shadow">
</section>
<section>
<h2>CSS语法(3)</h2>
<img src="img/css_s3.png" class="box shadow">
</section>
<section>
<h2>CSS语法(4)</h2>
<img src="img/css_s4.png" class="box shadow">
</section>
<section>
<h2>CSS语法(5)</h2>
<img src="img/css_s5.png" class="box shadow">
</section>
<section>
<h2>CSS选择器分类</h2>
<ul>
<li>基本选择器</li>
<li>属性选择器</li>
<li>层次选择器</li>
<li>伪类选择器</li>
<li>伪元素选择器</li>
</ul>
</section>
<section>
<h2>基本选择器</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/neLh3cda/1/">http://jsfiddle.net/hjzheng/neLh3cda/1/</a>
</small>
<img src="img/css_select1.png" class="box shadow">
</section>
<section>
<h2>属性选择器</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/1ysy6rzb/">http://jsfiddle.net/hjzheng/1ysy6rzb/</a>
</small>
<img src="img/css_select2.png" class="box shadow">
</section>
<section>
<h2>层次选择器</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/rc4jrcau/">http://jsfiddle.net/hjzheng/rc4jrcau/</a>
</small>
<img src="img/css_select3.png" class="box shadow">
</section>
<section>
<h2>伪类选择器:动态伪类选择器</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/L7z9e4ae/">http://jsfiddle.net/hjzheng/L7z9e4ae/</a>
</small>
<img src="img/css_select4.png" class="box shadow">
</section>
<section>
<h2>伪类选择器:UI元素伪类状态选择器</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/9sLcht0m/">http://jsfiddle.net/hjzheng/9sLcht0m/</a>
</small>
<img src="img/css_select5.png" class="box shadow">
</section>
<section>
<h2>伪类选择器:目标伪类选择器</h2>
<small>
Example:<a href="http://jsfiddle.net/hjzheng/vdvucuhd/1/">http://jsfiddle.net/hjzheng/vdvucuhd/1/</a>
</small>
<img src="img/css_select8.png" class="box shadow">
</section>
<section>
<h2>伪类选择器:否定伪类选择器</h2>
<small>
Example:<a href="http://jsfiddle.net/hjzheng/neLh3cda/1/">http://jsfiddle.net/hjzheng/neLh3cda/1/</a>
</small>
<img src="img/css_select7.png" class="box shadow">
</section>
<section>
<h2>伪类选择器:结构伪类选择器(1)</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/fnvgbe9n/">http://jsfiddle.net/hjzheng/fnvgbe9n/</a>
</small>
<img src="img/css_select6-1.png" class="box shadow">
</section>
<section>
<h2>伪类选择器:结构伪类选择器(2)</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/fnvgbe9n/">http://jsfiddle.net/hjzheng/fnvgbe9n/</a>
</small>
<img src="img/css_select6-2.png" class="box shadow">
</section>
<section>
<h2>伪元素选择器</h2>
<small>Example:
<a href="http://jsfiddle.net/hjzheng/Lpjz3fpj/">http://jsfiddle.net/hjzheng/Lpjz3fpj/</a>
</small>
<img src="img/css_select9.png" class="box shadow">
</section>
<section>
<h2>让IE6,7,8支持更多选择器</h2>
<div>网址:
<a href="http://selectivizr.com/">selectivizr</a>
</div>
<img src="img/css_selectivizr.png" class="box shadow">
</section>
<section data-markdown>
<script type="text/template">
## 扩展阅读
- [CSS 选择器][0]
- [CUF_meeting_knowledge_share][1]
[0]:https://github.com/hjzheng/CUF_meeting_knowledge_share/issues/3
[1]:https://github.com/hjzheng/CUF_meeting_knowledge_share
</script>
</section>
<section>
<section>
<h2>谢谢观赏</h2>
<div class="authorArea">
<p>2014-12-18</p>
<p>如果你喜欢,请<a href="https://github.com/hjzheng/CUF_PPTs">star</a>我</p>
</div>
</section>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
Reveal.initialize({
history: true,
transition: 'linear',
progress: true,
math: {
// mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
config: 'TeX-AMS_HTML-full'
},
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }
]
});
</script>
</body>
</html>