Last-modified: 2011-12-26 (月) 01:24:43
HTML・CSS/背景画像の表示位置を調整する(background-position)


確認したときの環境

方法

  1. background-positionプロパティを使う。
    [単位付きの値]、[パーセンテージ]、[top/right/bottom/left]。横と縦で計2つ指定する
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
    
    -
    |
    |
    |
    !
    
    div#header {
        background-image: url("../image/paburica-theme-01/toolbar_tab01.gif");
        background-repeat: no-repeat;
        background-position: right bottom;     /* 右下 */
    }