<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>华斐Blog &#187; CSS</title>
	<atom:link href="http://www.huafei117.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.huafei117.com</link>
	<description>华斐网志以及学习心得</description>
	<lastBuildDate>Wed, 28 Dec 2011 02:36:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>通用CSS样式表模版</title>
		<link>http://www.huafei117.com/2010/03/05/%e9%80%9a%e7%94%a8css%e6%a0%b7%e5%bc%8f%e8%a1%a8%e6%a8%a1%e7%89%88/</link>
		<comments>http://www.huafei117.com/2010/03/05/%e9%80%9a%e7%94%a8css%e6%a0%b7%e5%bc%8f%e8%a1%a8%e6%a8%a1%e7%89%88/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 15:11:05 +0000</pubDate>
		<dc:creator>华斐</dc:creator>
				<category><![CDATA[网络文摘]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS通用样式模板]]></category>

		<guid isPermaLink="false">http://www.huafei117.com/138.htm</guid>
		<description><![CDATA[今天在网络闲逛发现的东西，一个通用的CSS样式表模板， 把下面的CSS样式单独做一个模板CSS，假设命名为maters.css，而网站的CSS文件为style.css，那我们可以在style.css开头加入以下语句，即可将模版导入： @import &#34;master.css&#34;; 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 [...]]]></description>
			<content:encoded><![CDATA[<p>今天在网络闲逛发现的东西，一个通用的CSS样式表模板，</p>
<p>把下面的CSS样式单独做一个模板CSS，假设命名为maters.css，而网站的CSS文件为style.css，那我们可以在style.css开头加入以下语句，即可将模版导入：</p>
</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@import &quot;master.css&quot;;</span></pre></div></div>

</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/***** Browser Settings *****/</span>
<span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/***** Global Settings *****/</span>
&nbsp;
html<span style="color: #00AA00;">,</span> body <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
body <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span>/<span style="color: #cc66cc;">1.25</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Headings *****/</span>
&nbsp;
h1<span style="color: #00AA00;">,</span> h2<span style="color: #00AA00;">,</span> h3<span style="color: #00AA00;">,</span> h4<span style="color: #00AA00;">,</span> h5<span style="color: #00AA00;">,</span> h6 <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">25px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h2 <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h3 <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Common Formatting *****/</span>
&nbsp;
p<span style="color: #00AA00;">,</span> ul<span style="color: #00AA00;">,</span> ol <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1.25em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #00AA00;">,</span> ol <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1.25em</span> <span style="color: #933;">2.5em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
blockquote <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.25em</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.25em</span> <span style="color: #933;">1.25em</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1.25em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
small <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">0.85em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
img <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
sup <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">0.3em</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">baseline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
sub <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #3333ff;">:-0</span><span style="color: #933;">.2em</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">baseline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
acronym<span style="color: #00AA00;">,</span> abbr <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">help</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dashed</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Links *****/</span>
&nbsp;
a<span style="color: #00AA00;">,</span>
a<span style="color: #3333ff;">:link</span><span style="color: #00AA00;">,</span>
a<span style="color: #3333ff;">:visited</span><span style="color: #00AA00;">,</span>
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Forms *****/</span>
&nbsp;
form <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
input<span style="color: #00AA00;">,</span> select<span style="color: #00AA00;">,</span> textarea <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
textarea <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1.25</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
label <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Tables *****/</span>
&nbsp;
table <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1.25em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
table tr td <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Wrapper *****/</span>
&nbsp;
<span style="color: #cc00cc;">#wrap</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">960px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Global Classes *****/</span>
&nbsp;
.<span style="color: #000000; font-weight: bold;">clear</span>         <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.float-<span style="color: #000000; font-weight: bold;">left</span>    <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.float-<span style="color: #000000; font-weight: bold;">right</span>   <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
.text-<span style="color: #000000; font-weight: bold;">left</span>     <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.text-<span style="color: #000000; font-weight: bold;">right</span>    <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.text-<span style="color: #993333;">center</span>   <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.text-<span style="color: #993333;">justify</span>  <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">justify</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
.<span style="color: #993333;">bold</span>          <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.<span style="color: #993333;">italic</span>        <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.<span style="color: #993333;">underline</span>     <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.highlight</span>     <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ffc</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
.img-<span style="color: #000000; font-weight: bold;">left</span>      <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>margin<span style="color: #00AA00;">:</span><span style="color: #933;">4px</span> <span style="color: #933;">10px</span> <span style="color: #933;">4px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
.img-<span style="color: #000000; font-weight: bold;">right</span>     <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>margin<span style="color: #00AA00;">:</span><span style="color: #933;">4px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">4px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.nopadding</span>     <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.noindent</span>      <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>padding-<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.nobullet</span>      <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>list-style-image<span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>转载自<a href="http://cn.zacklive.com/" target="_blank">Zack Live</a>的《<a href="http://cn.zacklive.com/general-master-css-stylesheet/152/" target="_blank">通用CSS样式表模版</a>》，</p>
]]></content:encoded>
			<wfw:commentRss>http://www.huafei117.com/2010/03/05/%e9%80%9a%e7%94%a8css%e6%a0%b7%e5%bc%8f%e8%a1%a8%e6%a8%a1%e7%89%88/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Hack汇总快查</title>
		<link>http://www.huafei117.com/2010/01/17/css-hack%e6%b1%87%e6%80%bb%e5%bf%ab%e6%9f%a5/</link>
		<comments>http://www.huafei117.com/2010/01/17/css-hack%e6%b1%87%e6%80%bb%e5%bf%ab%e6%9f%a5/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 05:53:13 +0000</pubDate>
		<dc:creator>华斐</dc:creator>
				<category><![CDATA[网络文摘]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css hack]]></category>

		<guid isPermaLink="false">http://www.huafei117.com/97.html</guid>
		<description><![CDATA[屏蔽IE浏览器（也就是IE下不显示） *:lang(zh) select {font:12px&#160; !important;} /*FF的专用*/ select:empty {font:12px&#160; !important;} /*safari可见*/ 这里select是选择符，根据情况更换。第二句是MAC上safari浏览器独有的。 仅IE7识别 *+html&#160; {…} 当面临需要只针对IE7做样式的时候就可以采用这个HACK。 IE6及IE6以下识别 * html&#160; {…} 这个地方要特别注意很多地主都写了是IE6的HACK其实IE5.x同样可以识别这个HACK。其它浏览器不识别。 html/**/ &#62;body&#160; select {……} 这句与上一句的作用相同。 仅IE6不识别 select { display /*IE6不识别*/:none;} 这里主要是通过CSS注释分开一个属性与值，流释在冒号前。 仅IE6与IE5不识别 select/**/ { display /*IE6,IE5不识别*/:none;} 这里与上面一句不同的是在选择符与花括号之间多了一个CSS注释。 仅IE5不识别 select/*IE5不识别*/ { display:none;} 这一句是在上一句中去掉了属性区的注释。只有IE5不识别 盒模型解决方法 selct {width:IE5.x宽度; voice-family :&#34;\&#34;}\&#34;&#34;; voice-family:inherit; width:正确宽度;} 盒模型的清除方法不是通过!important来处理的。这点要明确。 清除浮动 select:after {content:&#34;.&#34;; display:block; height:0; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>屏蔽IE浏览器（也就是IE下不显示）</strong></p>
<blockquote><p>*:lang(zh) select {font:12px&#160; !important;} /*FF的专用*/      <br />select:empty {font:12px&#160; !important;} /*safari可见*/       <br />这里select是选择符，根据情况更换。第二句是MAC上safari浏览器独有的。</p>
</blockquote>
<p><strong>仅IE7识别</strong></p>
<blockquote><p>*+html&#160; {…}      <br />当面临需要只针对IE7做样式的时候就可以采用这个HACK。</p>
</blockquote>
<p><strong>IE6及IE6以下识别</strong></p>
<p> <span id="more-97"></span>
<p><strong></strong></p>
<blockquote><p>* html&#160; {…}      <br />这个地方要特别注意很多地主都写了是IE6的HACK其实IE5.x同样可以识别这个HACK。其它浏览器不识别。       <br />html/**/ &gt;body&#160; select {……}       <br />这句与上一句的作用相同。</p>
</blockquote>
<p><strong>仅IE6不识别</strong></p>
<blockquote><p>select { display /*IE6不识别*/:none;}      <br />这里主要是通过CSS注释分开一个属性与值，流释在冒号前。</p>
</blockquote>
<p><strong>仅IE6与IE5不识别</strong></p>
<blockquote><p>select/**/ { display /*IE6,IE5不识别*/:none;}      <br />这里与上面一句不同的是在选择符与花括号之间多了一个CSS注释。</p>
</blockquote>
<p><strong>仅IE5不识别</strong></p>
<blockquote><p>select/*IE5不识别*/ { display:none;}      <br />这一句是在上一句中去掉了属性区的注释。只有IE5不识别</p>
</blockquote>
<p><strong>盒模型解决方法</strong></p>
<blockquote><p>selct {width:IE5.x宽度; voice-family :&quot;\&quot;}\&quot;&quot;; voice-family:inherit; width:正确宽度;}      <br />盒模型的清除方法不是通过!important来处理的。这点要明确。</p>
</blockquote>
<p><strong>清除浮动</strong></p>
<blockquote><p>select:after {content:&quot;.&quot;; display:block; height:0; clear:both; visibility:hidden;}      <br />在Firefox中，当子级都为浮动时，那么父级的高度就无法完全的包住整个子级，那么这时用这个清除浮动的HACK来对父级做一次定义，那么就可以解决这个问题 。</p>
</blockquote>
<p><strong>截字省略号</strong></p>
<blockquote><p>select { -o-text-overflow:ellipsis; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; }      <br />这个是在越出长度后会自行的截掉多出部分的文字，并以省略号结尾，很好的一个技术。只是目前Firefox并不支持。</p>
</blockquote>
<p><strong>只有Opera识别</strong></p>
<blockquote><p>@media all and (min-width: 0px){ select {……}&#160; }      <br />针对Opera浏览器做单独的设定。</p>
<p>以上都是写CSS中的一些HACK，这些都是用来解决局部的兼容性问题，如果希望把兼容性的内容也分离出来，不妨试一下下面的几种过滤器。这些过滤器有的是写在CSS中通过过滤器导入特别的样式，也有的是写在HTML中的通过条件来链接或是导入需要的补丁样式。</p>
</blockquote>
<p><strong>IE5.x的过滤器，只有IE5.x可见</strong></p>
<blockquote><p>@media tty {      <br />i{content:&quot;\&quot;;/*&quot; &quot;*/}} @import &#8216;ie5win.css&#8217;; /*&quot;;}       <br />}/* */       <br />IE5/MAC的过滤器，一般用不着</p>
<p>[Copy to clipboard] [ - ]CODE:      <br />/*\*//*/       <br />&#160;&#160;&#160; @import &quot;ie5mac.css&quot;;       <br />/**/</p>
</blockquote>
<p><strong>IE的if条件Hack</strong></p>
<blockquote><p>&lt;!&#8211;[if IE]&gt; Only IE &lt;![endif]&#8211;&gt;      <br />所有的IE可识别       <br />&lt;!&#8211;[if IE 5.0]&gt; Only IE 5.0 &lt;![endif]&#8211;&gt;       <br />只有IE5.0可以识别       <br />&lt;!&#8211;[if gt IE 5.0]&gt; Only IE 5.0+ &lt;![endif]&#8211;&gt;       <br />IE5.0包换IE5.5都可以识别       <br />&lt;!&#8211;[if lt IE 6]&gt; Only IE 6- &lt;![endif]&#8211;&gt;       <br />仅IE6可识别       <br />&lt;!&#8211;[if gte IE 6]&gt; Only IE 6/+ &lt;![endif]&#8211;&gt;       <br />IE6以及IE6以下的IE5.x都可识别       <br />&lt;!&#8211;[if lte IE 7]&gt; Only IE 7/- &lt;![endif]&#8211;&gt;       <br />仅IE7可识别</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.huafei117.com/2010/01/17/css-hack%e6%b1%87%e6%80%bb%e5%bf%ab%e6%9f%a5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

