2010-11-20 24 views
0

画像をページの背景に動的にサイズ変更する方法はありますか?私はY軸で繰り返すバックグラウンドを持っていますが、高さのサイズを大きくし、ページの内容が少ない場合はバックグラウンドが適切に収まりません。だれでも助けてくれますか?おかげCSSの画像背景

+0

おそらく、http://stackoverflow.com/questions/1112597/stretch-image-as-backgroundの複製 – mattbasta

答えて

-1

実際に何をしたい(おそらくCSS3で?)まだ不可能です。私が考えている最善の方法は、CSSのバックグラウンドアタッチメントを使用することです。

body { 
background-attachment: fixed; /*background doesn't scroll out of the screen */ 
background-position: top center; /* background's center is in the center of the window */ 
}