HTML5で最近使っているリセットCSS

Category
Bookmark

浅漬けCSS的なもの

/* html5 reset css */

/* reset */
html, body, div, h1, h2, h3, h4, h5, h6, p, blockquote, q, pre, table, caption, colgroup, col, tbody, thead, tfoot, tr, th, td, ul, ol, li, dl, dt, dd, form, fieldset, legend, label, span, a, img, em, ins, del, cite, abbr, sup, sub, dfn, code, var, samp, kbd, object, script, noscript, style, iframe, embed, param, map, area,
menu, hr, address, small, strong, i, b,
article, aside, figure, footer, header, hgroup, nav, section, figcaption, time, video, audio, mark, ruby, rt, rp, bdo, source, canvas, details, summary, command,
datalist, keygen, output, progress, meter {
  margin: 0;
  padding: 0;
  font-size: 100%;
}

address, article, aside, figure, figcaption, footer, header, hgroup, hr, legend, menu, nav,  section, summary {
  display: block;
}

li {
  list-style-type: none;
}

a img {
  border: none;
}

img {
  vertical-align: bottom;
}

[hidden] {
  display: none;
}

これをそっくりこのまま使うってわけじゃなくて、必要に応じて足したり引いたりします。

その他・用意しておくと便利そうな指定もの


* {
  word-wrap: break-word;
}

body {
  line-height: 1.5;
  letter-spacing: 0.03em;
  background: #fff;
  color: #333;
}

a:link {}
a:visited {}
a:hover {}
a:active {}

label { 
  cursor: pointer;
}

mark {
  background-color: #ff9;
  color: #000;
}



/* clearfix
:after {
  content: ".";
  display: block;
  clear: both;
  height: 0;
  visibility: hidden;
}
*/

body要素に指定した色などは、適宜書き換えます。