サイト内検索

...スタイルシート(css)...

スタイルシートの使い方(headの中)

ヘッダー(<head>〜</head>)の中に書く方法

《一つを指定をする場合》

[headの中]

<style type="text/css">
<!--
sam1{color: green;}
-->
</style>

[bodyの中]

色は、<span class="sam1">みどり色</span>です。

[ブラウザ上]

色は、みどり色です。

《複数を指定をする場合》

[headの中]

<style type="text/css">
<!--
sam2{font-size: 20pt; color: green;}
-->
</style>

[bodyの中]

<div class="sam2">サイズは20pt・色はみどり色です。</div>

[ブラウザ上]

サイズは20pt・色はみどり色です。

Copyright c 2007.10.01 luc All rights reserved.