无意中看到的Google Developers的CSS,头部的reset写的很好,做前端的朋友值得借鉴.
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 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | @charset "utf-8"; html { margin:0; padding:0; border:0 } .bp-reset-element,body,h1,h2,h3,h4,h5,h6,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,blockquote,q,th,td,caption,table,div,span,object,iframe,p,pre,a,abbr,acronym,address,code,del,dfn,em,img,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,tbody,tfoot,thead,tr { margin:0; padding:0; border:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline } article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary { display:block } blockquote,q { quotes:"" "" } blockquote:before,blockquote:after,q:before,q:after { content:"" } th,td,caption { float:none !important; text-align:left; font-weight:normal; vertical-align:middle } table { border-collapse:separate; border-spacing:0; vertical-align:middle } a img { border:none } body { line-height:1.5; font-family:"Arial",sans-serif; color:#333; font-size:81.25% } h1,h2,h3,h4,h5,h6 { font-weight:normal; color:#222 } h1 img,h2 img,h3 img,h4 img,h5 img,h6 img { margin:0 } h1 { font-size:3em; line-height:1; margin-bottom:0.50em } h2 { font-size:2em; margin-bottom:0.75em } h3 { font-size:1.5em; line-height:1; margin-bottom:1.00em } h4 { font-size:1.2em; line-height:1.25; margin-bottom:1.25em } h5 { font-size:1em; font-weight:bold; margin-bottom:1.50em } h6 { font-size:1em; font-weight:bold } p { margin:0 0 1.5em } p .left { display:inline; float:left; margin:1.5em 1.5em 1.5em 0; padding:0 } p .right { display:inline; float:right; margin:1.5em 0 1.5em 1.5em; padding:0 } a { text-decoration:underline; color:#006ac8 } a:visited { color:#551a8b } a:focus { color:#006ac8 } a:hover { color:#006ac8 } a:active { color:red } blockquote { margin:1.5em; color:#666; font-style:italic } strong,dfn { font-weight:bold } em,dfn { font-style:italic } sup,sub { line-height:0 } abbr,acronym { border-bottom:1px dotted #666 } address { margin:0 0 1.5em; font-style:italic } del { color:#666 } pre { margin:1.5em 0; white-space:pre } pre,code,tt { font:1em "Droid Sans Mono",monospace; line-height:1.5 } li ul,li ol { margin:0 } ul,ol { margin:0 1.5em 1.5em 0; padding-left:1.5em } ul { list-style-type:disc } ol { list-style-type:decimal } dl { margin:0 0 1.5em 0 } dl dt { font-weight:bold } dd { margin-left:1.5em } table { margin-bottom:1.4em; width:100% } th { font-weight:bold } thead th { background:#6199df } th,td,caption { padding:4px 10px 4px 5px } table.striped tr:nth-child(even) td,table tr.even td { background:#efefef } tfoot { font-style:italic } caption { background:#eee } .quiet { color:#666 } .loud { color:#111 } body { line-height:1.67; background-color:#fff; overflow-y:scroll; min-width:1000px } |
值得研究,之前弄了几个网站的reset都不满意,借鉴下~