|
|
@ -2,14 +2,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
/* Document
|
|
|
|
/* Document
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Correct the line height in all browsers.
|
|
|
|
* 1. 正确设置所有浏览器中的行高。
|
|
|
|
* 2. Prevent adjustments of font size after orientation changes in
|
|
|
|
* 2. 防止在 Windows Phone 的 IE 和 iOS 中发生方向变化后字体大小调整。
|
|
|
|
* IE on Windows Phone and in iOS.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
html {
|
|
|
|
html {
|
|
|
|
|
|
|
|
line-height: 1.15; /* 1 */
|
|
|
|
line-height: 1.15; /* 1 */
|
|
|
|
-ms-text-size-adjust: 100%; /* 2 */
|
|
|
|
-ms-text-size-adjust: 100%; /* 2 */
|
|
|
|
-webkit-text-size-adjust: 100%; /* 2 */
|
|
|
|
-webkit-text-size-adjust: 100%; /* 2 */
|
|
|
@ -17,19 +14,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
/* Sections
|
|
|
|
/* Sections
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove the margin in all browsers (opinionated).
|
|
|
|
* 移除所有浏览器中的 body 边距(这是作者的意见)。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
body {
|
|
|
|
margin: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in IE 9-.
|
|
|
|
* 在 IE 9- 中正确显示这些 HTML5 元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
article,
|
|
|
|
article,
|
|
|
|
aside,
|
|
|
|
aside,
|
|
|
|
footer,
|
|
|
|
footer,
|
|
|
@ -40,10 +34,8 @@ section {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Correct the font size and margin on `h1` elements within `section` and
|
|
|
|
* 在 Chrome, Firefox, 和 Safari 中修正 `h1` 元素在 `section` 和 `article` 上下文中字体大小和边距的问题。
|
|
|
|
* `article` contexts in Chrome, Firefox, and Safari.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
h1 {
|
|
|
|
font-size: 2em;
|
|
|
|
font-size: 2em;
|
|
|
|
margin: 0.67em 0;
|
|
|
|
margin: 0.67em 0;
|
|
|
@ -51,12 +43,9 @@ h1 {
|
|
|
|
|
|
|
|
|
|
|
|
/* Grouping content
|
|
|
|
/* Grouping content
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in IE 9-.
|
|
|
|
* 1. 在 IE 9- 中正确显示这些元素。
|
|
|
|
* 1. Add the correct display in IE.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
figcaption,
|
|
|
|
figcaption,
|
|
|
|
figure,
|
|
|
|
figure,
|
|
|
|
main { /* 1 */
|
|
|
|
main { /* 1 */
|
|
|
@ -64,18 +53,16 @@ main { /* 1 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct margin in IE 8.
|
|
|
|
* 在 IE 8 中正确设置 figure 的边距。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
figure {
|
|
|
|
figure {
|
|
|
|
margin: 1em 40px;
|
|
|
|
margin: 1em 40px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Add the correct box sizing in Firefox.
|
|
|
|
* 1. 在 Firefox 中正确设置 hr 的盒模型。
|
|
|
|
* 2. Show the overflow in Edge and IE.
|
|
|
|
* 2. 在 Edge 和 IE 中显示溢出内容。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
hr {
|
|
|
|
hr {
|
|
|
|
box-sizing: content-box; /* 1 */
|
|
|
|
box-sizing: content-box; /* 1 */
|
|
|
|
height: 0; /* 1 */
|
|
|
|
height: 0; /* 1 */
|
|
|
@ -83,10 +70,9 @@ hr {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
|
|
* 1. 在所有浏览器中正确继承和缩放字体大小。
|
|
|
|
* 2. Correct the odd `em` font sizing in all browsers.
|
|
|
|
* 2. 修正所有浏览器中奇怪的 `em` 字体大小。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
pre {
|
|
|
|
pre {
|
|
|
|
font-family: monospace, monospace; /* 1 */
|
|
|
|
font-family: monospace, monospace; /* 1 */
|
|
|
|
font-size: 1em; /* 2 */
|
|
|
|
font-size: 1em; /* 2 */
|
|
|
@ -94,22 +80,19 @@ pre {
|
|
|
|
|
|
|
|
|
|
|
|
/* Text-level semantics
|
|
|
|
/* Text-level semantics
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Remove the gray background on active links in IE 10.
|
|
|
|
* 1. 移除 IE 10 中活动链接上的灰色背景。
|
|
|
|
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
|
|
|
* 2. 移除 iOS 8+ 和 Safari 8+ 中链接下划线之间的空隙。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
a {
|
|
|
|
a {
|
|
|
|
background-color: transparent; /* 1 */
|
|
|
|
background-color: transparent; /* 1 */
|
|
|
|
-webkit-text-decoration-skip: objects; /* 2 */
|
|
|
|
-webkit-text-decoration-skip: objects; /* 2 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
|
|
|
|
* 1. 移除 Chrome 57- 和 Firefox 39- 中 h1 下方的边框。
|
|
|
|
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
|
|
|
* 2. 在 Chrome, Edge, IE, Opera, 和 Safari 中添加正确的文本装饰。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
abbr[title] {
|
|
|
|
abbr[title] {
|
|
|
|
border-bottom: none; /* 1 */
|
|
|
|
border-bottom: none; /* 1 */
|
|
|
|
text-decoration: underline; /* 2 */
|
|
|
|
text-decoration: underline; /* 2 */
|
|
|
@ -117,28 +100,25 @@ abbr[title] {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
|
|
|
* 防止 Safari 6 中 `bolder` 样式的重复应用。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
b,
|
|
|
|
b,
|
|
|
|
strong {
|
|
|
|
strong {
|
|
|
|
font-weight: inherit;
|
|
|
|
font-weight: inherit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
|
|
* 在 Chrome, Edge, 和 Safari 中添加正确的字体粗细。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
b,
|
|
|
|
b,
|
|
|
|
strong {
|
|
|
|
strong {
|
|
|
|
font-weight: bolder;
|
|
|
|
font-weight: bolder;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
|
|
* 1. 在所有浏览器中正确继承和缩放字体大小。
|
|
|
|
* 2. Correct the odd `em` font sizing in all browsers.
|
|
|
|
* 2. 修正所有浏览器中奇怪的 `em` 字体大小。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
code,
|
|
|
|
code,
|
|
|
|
kbd,
|
|
|
|
kbd,
|
|
|
|
samp {
|
|
|
|
samp {
|
|
|
@ -147,35 +127,30 @@ samp {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct font style in Android 4.3-.
|
|
|
|
* 在 Android 4.3- 中添加正确的字体风格。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
dfn {
|
|
|
|
dfn {
|
|
|
|
font-style: italic;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct background and color in IE 9-.
|
|
|
|
* 在 IE 9- 中添加正确的背景色和颜色。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
mark {
|
|
|
|
mark {
|
|
|
|
background-color: #ff0;
|
|
|
|
background-color: #ff0;
|
|
|
|
color: #000;
|
|
|
|
color: #000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct font size in all browsers.
|
|
|
|
* 在所有浏览器中添加正确的字体大小。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
small {
|
|
|
|
small {
|
|
|
|
font-size: 80%;
|
|
|
|
font-size: 80%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Prevent `sub` and `sup` elements from affecting the line height in
|
|
|
|
* 防止 `sub` 和 `sup` 元素影响所有浏览器中的行高。
|
|
|
|
* all browsers.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
sub,
|
|
|
|
sub,
|
|
|
|
sup {
|
|
|
|
sup {
|
|
|
|
font-size: 75%;
|
|
|
|
font-size: 75%;
|
|
|
@ -194,49 +169,42 @@ sup {
|
|
|
|
|
|
|
|
|
|
|
|
/* Embedded content
|
|
|
|
/* Embedded content
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in IE 9-.
|
|
|
|
* 在 IE 9- 中正确显示音频和视频元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
audio,
|
|
|
|
audio,
|
|
|
|
video {
|
|
|
|
video {
|
|
|
|
display: inline-block;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in iOS 4-7.
|
|
|
|
* 在 iOS 4-7 中正确显示没有控制栏的音频元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
audio:not([controls]) {
|
|
|
|
audio:not([controls]) {
|
|
|
|
display: none;
|
|
|
|
display: none;
|
|
|
|
height: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove the border on images inside links in IE 10-.
|
|
|
|
* 移除 IE 10- 中图片链接内的边框。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
img {
|
|
|
|
border-style: none;
|
|
|
|
border-style: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Hide the overflow in IE.
|
|
|
|
* 在 IE 中隐藏 SVG 溢出部分。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
svg:not(:root) {
|
|
|
|
svg:not(:root) {
|
|
|
|
overflow: hidden;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Forms
|
|
|
|
/* Forms
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Change the font styles in all browsers (opinionated).
|
|
|
|
* 1. 更改所有浏览器中的表单元素字体样式(意见性)。
|
|
|
|
* 2. Remove the margin in Firefox and Safari.
|
|
|
|
* 2. 移除 Firefox 和 Safari 中的边距。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
button,
|
|
|
|
button,
|
|
|
|
input,
|
|
|
|
input,
|
|
|
|
optgroup,
|
|
|
|
optgroup,
|
|
|
@ -249,31 +217,27 @@ textarea {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Show the overflow in IE.
|
|
|
|
* 1. 在 IE 中显示溢出。
|
|
|
|
* 1. Show the overflow in Edge.
|
|
|
|
* 2. 在 Edge 中显示溢出。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
button,
|
|
|
|
button,
|
|
|
|
input { /* 1 */
|
|
|
|
input { /* 1 */
|
|
|
|
overflow: visible;
|
|
|
|
overflow: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
|
|
* 移除 Edge, Firefox, 和 IE 中的文本转换继承。
|
|
|
|
* 1. Remove the inheritance of text transform in Firefox.
|
|
|
|
* 1. 移除 Firefox 中的文本转换继承。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
button,
|
|
|
|
button,
|
|
|
|
select { /* 1 */
|
|
|
|
select { /* 1 */
|
|
|
|
text-transform: none;
|
|
|
|
text-transform: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
|
|
|
* 1. 防止 WebKit 中的一个 bug,在 Android 4 中破坏本地 `audio` 和 `video` 控件。
|
|
|
|
* controls in Android 4.
|
|
|
|
* 2. 修正 iOS 和 Safari 中无法自定义可点击类型的样式。
|
|
|
|
* 2. Correct the inability to style clickable types in iOS and Safari.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
button,
|
|
|
|
button,
|
|
|
|
html [type="button"], /* 1 */
|
|
|
|
html [type="button"], /* 1 */
|
|
|
|
[type="reset"],
|
|
|
|
[type="reset"],
|
|
|
@ -282,9 +246,8 @@ html [type="button"], /* 1 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove the inner border and padding in Firefox.
|
|
|
|
* 移除 Firefox 中按钮和输入框聚焦时的内边距和边框。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
button::-moz-focus-inner,
|
|
|
|
button::-moz-focus-inner,
|
|
|
|
[type="button"]::-moz-focus-inner,
|
|
|
|
[type="button"]::-moz-focus-inner,
|
|
|
|
[type="reset"]::-moz-focus-inner,
|
|
|
|
[type="reset"]::-moz-focus-inner,
|
|
|
@ -294,9 +257,8 @@ button::-moz-focus-inner,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Restore the focus styles unset by the previous rule.
|
|
|
|
* 恢复 Firefox 中移除的按钮和输入框的焦点样式。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
button:-moz-focusring,
|
|
|
|
button:-moz-focusring,
|
|
|
|
[type="button"]:-moz-focusring,
|
|
|
|
[type="button"]:-moz-focusring,
|
|
|
|
[type="reset"]:-moz-focusring,
|
|
|
|
[type="reset"]:-moz-focusring,
|
|
|
@ -305,20 +267,17 @@ button:-moz-focusring,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Correct the padding in Firefox.
|
|
|
|
* 在 Firefox 中修正 fieldset 的内边距。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
fieldset {
|
|
|
|
fieldset {
|
|
|
|
padding: 0.35em 0.75em 0.625em;
|
|
|
|
padding: 0.35em 0.75em 0.625em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Correct the text wrapping in Edge and IE.
|
|
|
|
* 1. 在 Edge 和 IE 中修正文本换行。
|
|
|
|
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
|
|
|
* 2. 在 IE 中修正从 fieldset 继承的颜色。
|
|
|
|
* 3. Remove the padding so developers are not caught out when they zero out
|
|
|
|
* 3. 移除内边距,以防开发人员在所有浏览器中将 fieldset 的内边距设置为零时出现问题。
|
|
|
|
* `fieldset` elements in all browsers.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
legend {
|
|
|
|
legend {
|
|
|
|
box-sizing: border-box; /* 1 */
|
|
|
|
box-sizing: border-box; /* 1 */
|
|
|
|
color: inherit; /* 2 */
|
|
|
|
color: inherit; /* 2 */
|
|
|
@ -329,28 +288,25 @@ legend {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Add the correct display in IE 9-.
|
|
|
|
* 1. 在 IE 9- 中正确显示进度条。
|
|
|
|
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
|
|
* 2. 在 Chrome, Firefox, 和 Opera 中正确设置垂直对齐方式。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
progress {
|
|
|
|
progress {
|
|
|
|
display: inline-block; /* 1 */
|
|
|
|
display: inline-block; /* 1 */
|
|
|
|
vertical-align: baseline; /* 2 */
|
|
|
|
vertical-align: baseline; /* 2 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove the default vertical scrollbar in IE.
|
|
|
|
* 移除 IE 中 textarea 的默认垂直滚动条。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
textarea {
|
|
|
|
textarea {
|
|
|
|
overflow: auto;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Add the correct box sizing in IE 10-.
|
|
|
|
* 1. 在 IE 10- 中正确设置 checkbox 和 radio 的盒模型。
|
|
|
|
* 2. Remove the padding in IE 10-.
|
|
|
|
* 2. 移除 IE 10- 中 checkbox 和 radio 的内边距。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
[type="checkbox"],
|
|
|
|
[type="checkbox"],
|
|
|
|
[type="radio"] {
|
|
|
|
[type="radio"] {
|
|
|
|
box-sizing: border-box; /* 1 */
|
|
|
|
box-sizing: border-box; /* 1 */
|
|
|
@ -358,38 +314,34 @@ textarea {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
|
|
* 在 Chrome 中修正数字输入框上下箭头的高度。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
[type="number"]::-webkit-inner-spin-button,
|
|
|
|
[type="number"]::-webkit-inner-spin-button,
|
|
|
|
[type="number"]::-webkit-outer-spin-button {
|
|
|
|
[type="number"]::-webkit-outer-spin-button {
|
|
|
|
height: auto;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Correct the odd appearance in Chrome and Safari.
|
|
|
|
* 1. 修正 Chrome 和 Safari 中搜索框的奇怪外观。
|
|
|
|
* 2. Correct the outline style in Safari.
|
|
|
|
* 2. 修正 Safari 中搜索框的轮廓样式。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
[type="search"] {
|
|
|
|
[type="search"] {
|
|
|
|
-webkit-appearance: textfield; /* 1 */
|
|
|
|
-webkit-appearance: textfield; /* 1 */
|
|
|
|
outline-offset: -2px; /* 2 */
|
|
|
|
outline-offset: -2px; /* 2 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
|
|
|
* 移除 macOS 上 Chrome 和 Safari 中搜索框取消按钮和装饰的内边距。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
[type="search"]::-webkit-search-cancel-button,
|
|
|
|
[type="search"]::-webkit-search-cancel-button,
|
|
|
|
[type="search"]::-webkit-search-decoration {
|
|
|
|
[type="search"]::-webkit-search-decoration {
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 1. Correct the inability to style clickable types in iOS and Safari.
|
|
|
|
* 1. 修正 iOS 和 Safari 中无法自定义可点击类型的样式。
|
|
|
|
* 2. Change font properties to `inherit` in Safari.
|
|
|
|
* 2. 在 Safari 中更改字体属性以继承。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-file-upload-button {
|
|
|
|
::-webkit-file-upload-button {
|
|
|
|
-webkit-appearance: button; /* 1 */
|
|
|
|
-webkit-appearance: button; /* 1 */
|
|
|
|
font: inherit; /* 2 */
|
|
|
|
font: inherit; /* 2 */
|
|
|
@ -397,51 +349,43 @@ textarea {
|
|
|
|
|
|
|
|
|
|
|
|
/* Interactive
|
|
|
|
/* Interactive
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
/**
|
|
|
|
/*
|
|
|
|
* 1. 在 IE 9- 中正确显示 details 元素。
|
|
|
|
* Add the correct display in IE 9-.
|
|
|
|
* 2. 在 Edge, IE, 和 Firefox 中正确显示 menu 元素。
|
|
|
|
* 1. Add the correct display in Edge, IE, and Firefox.
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
details, /* 1 */
|
|
|
|
details, /* 1 */
|
|
|
|
menu {
|
|
|
|
menu {
|
|
|
|
display: block;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/**
|
|
|
|
* Add the correct display in all browsers.
|
|
|
|
* 在所有浏览器中正确显示 summary 元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
summary {
|
|
|
|
summary {
|
|
|
|
display: list-item;
|
|
|
|
display: list-item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Scripting
|
|
|
|
/* Scripting
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in IE 9-.
|
|
|
|
* 在 IE 9- 中正确显示 canvas 元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
canvas {
|
|
|
|
canvas {
|
|
|
|
display: inline-block;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in IE.
|
|
|
|
* 在 IE 中正确显示 template 元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
template {
|
|
|
|
template {
|
|
|
|
display: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Hidden
|
|
|
|
/* Hidden
|
|
|
|
========================================================================== */
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Add the correct display in IE 10-.
|
|
|
|
* 在 IE 10- 中正确显示带有 hidden 属性的元素。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
[hidden] {
|
|
|
|
[hidden] {
|
|
|
|
display: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|