HTML5のスタイルシート2

では、順番にスタイルシートを解説します。


/* 背景焦げ茶文字白120%大きい |説明:ボディ部全体を決めます*/	
 body {
/* 横幅を見やすく90%にします*/
    width:90%; 
/* その内側を1%マージンします*/
    margin:1% auto;
/* 背景色を焦げ茶。色の3原色RGBを書きます。6桁でも可 */
    background-color:#320;
/* 文字色を白 */
    color:white;
/* 閉じます */
}

/* リンクの色を黄色 */
a{ color:yellow; }
/* リンク済みの色をアイボリーに近いffff66 */
a:visited{ color:#ff6; }

/* 章節などの階層の大きさを指定 */
h1{ font-size:135%; }
h2{ font-size:130%; }
h3{ font-size:125%; }
h4{ font-size:120%; }
h5{ font-size:115%; }
h6{ font-size:110%; }

/* 段落のclassを右揃え */
p.right {text-align: right;}
/* 段落pのclassをセンタリング */
p.center {text-align: center;}

/* ヘッダ部,ナビゲーション、本文、フッタ部の */
header, nav, section, footer {
/* 表示形式をブロックにし、前後は改行される */
    display:block;
/* マージン(外側の余白)を1ピックス */    
    margin:1px auto;
/* パディング(内側の余白)を5ピックス */
    padding:5px;
}
	

HTML5非対応ブラウザのかたはこちらをクリック