-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfirst-of-type.html
52 lines (51 loc) · 1.3 KB
/
first-of-type.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
div :first-of-type {
background-color: lime;
}
/* p:first-child{
color: red;
};*/
p:first-of-type{
color:blue;
}
</style>
</head>
<body>
<div>
<span>This `span` is first!</span>
<span>But this `span` isn't.</span>
<span>This <em>nested `em` is</em>!</span>
<span>And so is this <span>nested `span`</span>!</span>
<b>This `b` qualifies!</b><p>dsfdsf</p>
<span>This final `span` does not.</span>
</div>
<div>
<i>第1行</i>
<p>第2行</p>
<p>第3行</p>
<p>第4行</p>
</div>
<div>paper.js</div>
<div>一个牛逼的d3特效<a href="http://paperjs.org/">点击进入</a></div>
<div>
上网输入一个域名。这个域名会经过dns解析解析成IP地址
谷歌之类的域名被防火墙屏蔽了
<br/>
域名解析规则会先看本地host,本地有就用本地的。没有就问dns服务器要解析
</div>
new会经历以下四个步骤
<br/>
1.创建一个新对象
2.将构造函数的作用域赋给新对象(因此this 就指向了这个新对象)
3.执行构造函数的代码(为这个新对象添加属性)
4.返回新对象
<script type="text/javascript">
//切记元素后面加空格和不加空格区别很大
</script>
</body>
</html>