記述形式 | color : ColorName | #rrggbb | #rgb | rgb(num,num,num) | rgb(%,%,%) ; |
---|---|
適用 | all elements |
使用方法 |
文字色を設定します。 ColorName と #rrggbb についてはこちらを参照。 #rgb 指定は各色を指定するレンジに 0 〜 f の16進数で記述する。 [ 例 ] : #f00 → 赤 rgb(num,num,num) 指定は前から順に 赤,緑,青 で 0 〜 255 の数値で記述する。 [ 例 ] : rgb(255,0,0) → 赤 rgb(%,%,%) 指定は 前出の rgb(num,num,num) をパーセンテージ指定したものです。 [ 例 ] : rgb(100%,0%,0%) → 赤 |
実行例 |
<SPAN STYLE="color:red ">red color</SPAN>red color <SPAN STYLE=" color:#00ff00 ">green color</SPAN>green color <SPAN STYLE=" color:#00f ">blue color</SPAN>blue color <SPAN STYLE=" color:rgb(255,255,0) ">yellow color</SPAN>yellow color <SPAN STYLE=" color:rgb(100%,0%,100%) ">pink color</SPAN>pink color ※ 認識しやすいように fon-size:x-large で表示しています。 |
サポート ブラウザ |
IE3.x , IE4.x , IE5.0x , IE5.5x , NN4.x , NN6.x |