Home > CSS > CSS初期設定

CSS初期設定

  • 2010-10-29 (金) 4:11
  • CSS
  • hatena button
  • hatena count
  • save this page del.icio.us

個人的に使っているCSS初期設定です。自分用にメモ

@charset "utf-8";
/* CSS Document */
/* CSS 初期設定 */
body {
margin: 0;
padding: 0;
background-color: #FFFFFF;
color:#555;
font-family: Arial, Helvetica, Verdana, "ヒラギノ角ゴPro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, "MS Pゴシック", sans-serif;
line-height: 1.5;
}

body { font-size: 62.5%; /* 10px */ }
p { font-size: 1.4em; /* 14px */ }
h1,h2,h3,h4,h5,h6 {
font-style: normal;
font-weight: normal;
font-size: 1.4em;
}

body,div,pre,p,blockquote,
form,fieldset,input,textarea,select,option,
dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,
table,th,td,embed,object {
margin: 0;
padding: 0;
*vertical-align: baseline;
}

table {border-spacing:0;}
* html table {border-collapse:collapse;}
*:first-child+html table {border-collapse:collapse;}
caption,th {text-align:left; font-weight:normal;}
table,th,td,img {border:0;}
img,input {vertical-align:middle;}
q:before,q:after {content:”;}
ul {list-style: none;}
a {color: #0060ff;text-decoration: none;}
a:visited {color: #3C25A1;text-decoration: none;}
a:hover {color: #66f;text-decoration: underline;}

/* 汎用class定義*/
.block-center {margin-right: auto;margin-left: auto;}
.txt-center {text-align: center;}
.inline{display: inline;}
.block{display: block;}
.float-left {float:left;}
.float-right {float:right;}
/* new clearfix */
.clearfix:after {visibility: hidden; display: block; font-size: 0; content: ” “; clear: both; height: 0;}
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */

ちなみに個人で参考にしたのはここだったと思います。
▼base.cssメモ(初期化と基本設定)
http://archiva.jp/web/html-css/base_css.html

CSSの初期化ファイルに関しては、CSSハックとの兼ね合いなども含めて、サイトを作る度に変化し、より汎用が効くものにしていくほうが良いかもしれません。

以下参考までに。

▼[CSS]ブラウザのスタイルを初期化するスタイルシートのサンプル集
http://coliss.com/articles/build-websites/operation/css/4…

▼base.cssメモ(初期化と基本設定)
http://archiva.jp/web/html-css/base_css.html

▼CSS?/初期設定
http://www.soratomo.com/xoops/modules/xpwiki/?CSS%2F%BD%E…

▼CSSの初期化 init.css
http://webmagic.onion-head.com/css/lib/css_init.php

▼新規サイト制作セット(CSSライブラリ+基本フォルダ構造+HTMLテンプレート)、一式zipでダウンロードできるようにしました
http://kennsu.jp/2007/09/csshtmlzip.html

デジハリ講師に勧められたのはYahoo!のreset.cssでした。
▼YUI 2: Reset CSS
http://developer.yahoo.com/yui/reset/

いろいろありますね。

Popularity: 3% [?]

関連記事

タグ:

Comments:0

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://www.web-milk.com/articles/css/css%e5%88%9d%e6%9c%9f%e8%a8%ad%e5%ae%9a.html/trackback
Listed below are links to weblogs that reference
CSS初期設定 from Webデザイナーメモ|Webmilk

Home > CSS > CSS初期設定

ソーシャルメディア
NINJA TOOLS
最近の投稿
RSS ←WebmilkRSS購読
カテゴリー
プラグイン
天気

Return to page top