File tree 1 file changed +1
-8
lines changed
1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -25,37 +25,31 @@ selector {property: value;}
25
25
内联定义即是在对象的标记内使用对象的 style 属性定义适用其的样式表属性。
26
26
示例代码:
27
27
28
- ```HTML
29
28
<p style="color:#f00">这一行的字体颜色将显示为红色</p>
30
- ```
31
29
32
30
#### 内部样式块对象 Embedding a Style Block
33
31
34
32
你可以在你的 HTML 文档的` <head> ` 标记里插入一个` <style> ` 块对象。
35
33
示例代码:
36
34
37
- ```HTML
38
35
<style>
39
36
.test2 {
40
37
color: #000;
41
38
}
42
39
</style>
43
- ```
44
40
45
41
#### 外部样式表 Linking to a Style Sheet
46
42
47
43
你可以先建立外部样式表文件` *.css ` ,然后使用 HTML 的 link 对象。或者使用 ` @import ` 来引入。
48
44
示例代码:
49
45
50
- ```HTML
51
46
<!-- Use link elements -->
52
47
<link rel="stylesheet" href="core.css">
53
48
54
49
<!-- Use @imports -->
55
50
<style>
56
51
@import url("more.css");
57
52
</style>
58
- ```
59
53
60
54
** 注意** :在实际开发中,推荐使用 HTML 的 link 对象来引入。详细内容可以参见< http://www.waylau.com/css-code-guide/#css-miscellaneous >
61
55
@@ -67,7 +61,6 @@ selector {property: value;}
67
61
68
62
!important 作用是提高指定 CSS 样式规则的应用优先权。
69
63
70
- ```HTML
71
64
<!DOCTYPE html>
72
65
<html>
73
66
<head>
@@ -107,7 +100,7 @@ selector {property: value;}
107
100
<div class="test3">没有被覆盖</div>
108
101
</body>
109
102
</html>
110
- ```
103
+
111
104
112
105
![ ] ( ../images/important.jpg )
113
106
You can’t perform that action at this time.
0 commit comments