|
| 1 | +/* |
| 2 | + * HTML5 ✰ Boilerplate |
| 3 | + * |
| 4 | + * What follows is the result of much research on cross-browser styling. |
| 5 | + * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, |
| 6 | + * Kroc Camen, and the H5BP dev community and team. |
| 7 | + * |
| 8 | + * Detailed information about this CSS: h5bp.com/css |
| 9 | + * |
| 10 | + * ==|== normalize ========================================================== |
| 11 | + */ |
| 12 | + |
| 13 | + |
| 14 | +/* ============================================================================= |
| 15 | + HTML5 display definitions |
| 16 | + ========================================================================== */ |
| 17 | + |
| 18 | +article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } |
| 19 | +audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } |
| 20 | +audio:not([controls]) { display: none; } |
| 21 | +[hidden] { display: none; } |
| 22 | + |
| 23 | + |
| 24 | +/* ============================================================================= |
| 25 | + Base |
| 26 | + ========================================================================== */ |
| 27 | + |
| 28 | +/* |
| 29 | + * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units |
| 30 | + * 2. Force vertical scrollbar in non-IE |
| 31 | + * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g |
| 32 | + */ |
| 33 | + |
| 34 | +html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } |
| 35 | + |
| 36 | +body { margin: 0; font-size: 1em; line-height: 1.4; } |
| 37 | + |
| 38 | +body, button, input, select, textarea { font-family: sans-serif; color: #222; } |
| 39 | + |
| 40 | +/* |
| 41 | + * Remove text-shadow in selection highlight: h5bp.com/i |
| 42 | + * These selection declarations have to be separate |
| 43 | + * Also: hot pink! (or customize the background color to match your design) |
| 44 | + */ |
| 45 | + |
| 46 | +::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; } |
| 47 | +::selection { background: #fe57a1; color: #fff; text-shadow: none; } |
| 48 | + |
| 49 | + |
| 50 | +/* ============================================================================= |
| 51 | + Links |
| 52 | + ========================================================================== */ |
| 53 | + |
| 54 | +a { color: #00e; } |
| 55 | +a:visited { color: #551a8b; } |
| 56 | +a:hover { color: #06e; } |
| 57 | +a:focus { outline: thin dotted; } |
| 58 | + |
| 59 | +/* Improve readability when focused and hovered in all browsers: h5bp.com/h */ |
| 60 | +a:hover, a:active { outline: 0; } |
| 61 | + |
| 62 | + |
| 63 | +/* ============================================================================= |
| 64 | + Typography |
| 65 | + ========================================================================== */ |
| 66 | + |
| 67 | +abbr[title] { border-bottom: 1px dotted; } |
| 68 | + |
| 69 | +b, strong { font-weight: bold; } |
| 70 | + |
| 71 | +blockquote { margin: 1em 40px; } |
| 72 | + |
| 73 | +dfn { font-style: italic; } |
| 74 | + |
| 75 | +hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } |
| 76 | + |
| 77 | +ins { background: #ff9; color: #000; text-decoration: none; } |
| 78 | + |
| 79 | +mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } |
| 80 | + |
| 81 | +/* Redeclare monospace font family: h5bp.com/j */ |
| 82 | +pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; } |
| 83 | + |
| 84 | +/* Improve readability of pre-formatted text in all browsers */ |
| 85 | +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } |
| 86 | + |
| 87 | +q { quotes: none; } |
| 88 | +q:before, q:after { content: ""; content: none; } |
| 89 | + |
| 90 | +small { font-size: 85%; } |
| 91 | + |
| 92 | +/* Position subscript and superscript content without affecting line-height: h5bp.com/k */ |
| 93 | +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } |
| 94 | +sup { top: -0.5em; } |
| 95 | +sub { bottom: -0.25em; } |
| 96 | + |
| 97 | + |
| 98 | +/* ============================================================================= |
| 99 | + Lists |
| 100 | + ========================================================================== */ |
| 101 | + |
| 102 | +ul, ol { margin: 1em 0; padding: 0 0 0 40px; } |
| 103 | +dd { margin: 0 0 0 40px; } |
| 104 | +nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } |
| 105 | + |
| 106 | + |
| 107 | +/* ============================================================================= |
| 108 | + Embedded content |
| 109 | + ========================================================================== */ |
| 110 | + |
| 111 | +/* |
| 112 | + * 1. Improve image quality when scaled in IE7: h5bp.com/d |
| 113 | + * 2. Remove the gap between images and borders on image containers: h5bp.com/e |
| 114 | + */ |
| 115 | + |
| 116 | +img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } |
| 117 | + |
| 118 | +/* |
| 119 | + * Correct overflow not hidden in IE9 |
| 120 | + */ |
| 121 | + |
| 122 | +svg:not(:root) { overflow: hidden; } |
| 123 | + |
| 124 | + |
| 125 | +/* ============================================================================= |
| 126 | + Figures |
| 127 | + ========================================================================== */ |
| 128 | + |
| 129 | +figure { margin: 0; } |
| 130 | + |
| 131 | + |
| 132 | +/* ============================================================================= |
| 133 | + Forms |
| 134 | + ========================================================================== */ |
| 135 | + |
| 136 | +form { margin: 0; } |
| 137 | +fieldset { border: 0; margin: 0; padding: 0; } |
| 138 | + |
| 139 | +/* Indicate that 'label' will shift focus to the associated form element */ |
| 140 | +label { cursor: pointer; } |
| 141 | + |
| 142 | +/* |
| 143 | + * 1. Correct color not inheriting in IE6/7/8/9 |
| 144 | + * 2. Correct alignment displayed oddly in IE6/7 |
| 145 | + */ |
| 146 | + |
| 147 | +legend { border: 0; *margin-left: -7px; padding: 0; } |
| 148 | + |
| 149 | +/* |
| 150 | + * 1. Correct font-size not inheriting in all browsers |
| 151 | + * 2. Remove margins in FF3/4 S5 Chrome |
| 152 | + * 3. Define consistent vertical alignment display in all browsers |
| 153 | + */ |
| 154 | + |
| 155 | +button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } |
| 156 | + |
| 157 | +/* |
| 158 | + * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet) |
| 159 | + */ |
| 160 | + |
| 161 | +button, input { line-height: normal; } |
| 162 | + |
| 163 | +/* |
| 164 | + * 1. Display hand cursor for clickable form elements |
| 165 | + * 2. Allow styling of clickable form elements in iOS |
| 166 | + * 3. Correct inner spacing displayed oddly in IE7 (doesn't effect IE6) |
| 167 | + */ |
| 168 | + |
| 169 | +button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; } |
| 170 | + |
| 171 | +/* |
| 172 | + * Consistent box sizing and appearance |
| 173 | + */ |
| 174 | + |
| 175 | +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; } |
| 176 | +input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } |
| 177 | +input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } |
| 178 | + |
| 179 | +/* |
| 180 | + * Remove inner padding and border in FF3/4: h5bp.com/l |
| 181 | + */ |
| 182 | + |
| 183 | +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } |
| 184 | + |
| 185 | +/* |
| 186 | + * 1. Remove default vertical scrollbar in IE6/7/8/9 |
| 187 | + * 2. Allow only vertical resizing |
| 188 | + */ |
| 189 | + |
| 190 | +textarea { overflow: auto; vertical-align: top; resize: vertical; } |
| 191 | + |
| 192 | +/* Colors for form validity */ |
| 193 | +input:valid, textarea:valid { } |
| 194 | +input:invalid, textarea:invalid { background-color: #f0dddd; } |
| 195 | + |
| 196 | + |
| 197 | +/* ============================================================================= |
| 198 | + Tables |
| 199 | + ========================================================================== */ |
| 200 | + |
| 201 | +table { border-collapse: collapse; border-spacing: 0; } |
| 202 | +td { vertical-align: top; } |
| 203 | + |
| 204 | + |
| 205 | +/* ==|== primary styles ===================================================== |
| 206 | + Author: Shi Chuan |
| 207 | + ========================================================================== */ |
| 208 | + |
| 209 | + |
| 210 | +.fork img { |
| 211 | + position: absolute; |
| 212 | + top: 0; |
| 213 | + right: 0; |
| 214 | +} |
| 215 | + |
| 216 | +html { |
| 217 | + background:#F8FAF0; |
| 218 | +} |
| 219 | + |
| 220 | +body { |
| 221 | + width:800px; |
| 222 | + margin:0 auto; |
| 223 | +} |
| 224 | + |
| 225 | +header { |
| 226 | + margin-top: 50px; |
| 227 | +} |
| 228 | + |
| 229 | +header img {padding-top:5px; border-top:1px solid #ccc; display:block;} |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | +/* ==|== media queries ====================================================== |
| 241 | + PLACEHOLDER Media Queries for Responsive Design. |
| 242 | + These override the primary ('mobile first') styles |
| 243 | + Modify as content requires. |
| 244 | + ========================================================================== */ |
| 245 | + |
| 246 | +@media only screen and (min-width: 480px) { |
| 247 | + /* Style adjustments for viewports 480px and over go here */ |
| 248 | + |
| 249 | +} |
| 250 | + |
| 251 | +@media only screen and (min-width: 768px) { |
| 252 | + /* Style adjustments for viewports 768px and over go here */ |
| 253 | + |
| 254 | +} |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | +/* ==|== non-semantic helper classes ======================================== |
| 259 | + Please define your styles before this section. |
| 260 | + ========================================================================== */ |
| 261 | + |
| 262 | +/* For image replacement */ |
| 263 | +.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; } |
| 264 | +.ir br { display: none; } |
| 265 | + |
| 266 | +/* Hide from both screenreaders and browsers: h5bp.com/u */ |
| 267 | +.hidden { display: none !important; visibility: hidden; } |
| 268 | + |
| 269 | +/* Hide only visually, but have it available for screenreaders: h5bp.com/v */ |
| 270 | +.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } |
| 271 | + |
| 272 | +/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */ |
| 273 | +.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } |
| 274 | + |
| 275 | +/* Hide visually and from screenreaders, but maintain layout */ |
| 276 | +.invisible { visibility: hidden; } |
| 277 | + |
| 278 | +/* Contain floats: h5bp.com/q */ |
| 279 | +.clearfix:before, .clearfix:after { content: ""; display: table; } |
| 280 | +.clearfix:after { clear: both; } |
| 281 | +.clearfix { *zoom: 1; } |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | +/* ==|== print styles ======================================================= |
| 286 | + Print styles. |
| 287 | + Inlined to avoid required HTTP connection: h5bp.com/r |
| 288 | + ========================================================================== */ |
| 289 | + |
| 290 | +@media print { |
| 291 | + * { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */ |
| 292 | + a, a:visited { text-decoration: underline; } |
| 293 | + a[href]:after { content: " (" attr(href) ")"; } |
| 294 | + abbr[title]:after { content: " (" attr(title) ")"; } |
| 295 | + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */ |
| 296 | + pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } |
| 297 | + thead { display: table-header-group; } /* h5bp.com/t */ |
| 298 | + tr, img { page-break-inside: avoid; } |
| 299 | + img { max-width: 100% !important; } |
| 300 | + @page { margin: 0.5cm; } |
| 301 | + p, h2, h3 { orphans: 3; widows: 3; } |
| 302 | + h2, h3 { page-break-after: avoid; } |
| 303 | +} |
0 commit comments