いろいろなプロパティ


  1. 文字の大きさ
  2. 文字を飾る
  3. フォント
    • font-family: serif  (セリフ,明朝系)
    • font-family:sans-serif  (サンセリフ,ゴシック系フォント)
    • font-family: cursive  (カーシブ,筆記体,草書体)
    • font-family: fantasy  (ファンタジー)
    • font-family: monospace  (モノスペース,等幅)
    • text-decoration: none
    • text-decoration: line-through
    • text-decoration: underline
    • text-decoration: blink
    • text-decoration: overline

  4. 背景色
  5. ページに背景色を付ける
    body { background: #ffccff; }
    見出し(H2)に背景色を付ける
    h2 { background: yellow; }

  6. 境界線(border)
  7. div {border: solid 4px blue;}
    要素の周囲に境界線を引くのには border 属性を指定します。

    div {border: double 10px green;}
    要素の周囲に境界線を引くのには border 属性を指定します。
    doubleは2重線です。

    div {border: inset 4px blue;}
    要素の周囲に境界線を引くのには border 属性を指定します。
    div {border-bottom: double 10px blue; border-top: solid 2px red;}
    要素の周囲に境界線を引くのには border 属性を指定します。
    上下左右の境界線を個別に設定することもできます。

    border-bottom: double 10px blue   下境界線を2重線,幅10px, 青色
    border-top: solid 2px red   上境界線を実線,幅2px,赤色
    p {border-left: solid 10px red; width: 500px; line-height: 2;}

    要素の周囲に境界線を引くのには border 属性を指定します。 左側の境界線だけを強調することもできます。

    border-left: solid 10px red   左境界線を実線,幅10px,赤色
    width: 500px    この段落幅を400pxに
    line-height: 2    行幅(行間)を2に

    p {border-left: solid 10px red; width: 500px; line-height: 2;  padding: 32px; margin: 50px; }

    要素の周囲に境界線を引くのには border 属性を指定します。 左側の境界線だけを強調することもできます。

    border-left: solid 10px red   左境界線を実線,幅10px,赤色
    width: 500px    この段落幅を400pxに
    line-height: 2    行幅(行間)を2に

  8. テキストの位置
  9. テーブル(表)
  10.  →  表を作ってみる

  11. p, div, spanタグ
  12. 属性値



[戻る]