背景画像の繰り返し制御と固定

普通の繰り返し 横だけの繰り返し 縦だけの繰り返し 繰り返しなし

background-repeat: の値は、repeat, repeat-x, repeat-y, no-repeat のどれかです。(書かなければ repeat)

body {
  background-image: url(images/naruto.png);
  background-color: #ffffff;
   
   
}

次のように1行に書くこともできます。

body {background:#ffffff url(images/naruto.png)  ;}
スクロールで背景画像も移動 背景画像の位置が固定

background-attachment: の値は、scroll, fixed のどれかです。(書かなければ scroll)

他の背景にしてみる

背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル 背景サンプル