有沒有辦法在頁面背景上動態調整圖像大小?我有一個Y軸重複的背景,但如果我使高度尺寸更大,並且頁面包含的內容較少,則背景不適合。任何人都可以請幫忙嗎?感謝css中的圖像背景
0
A
回答
1
-1
事實上,你想要的是沒有可能(或許在CSS3?)。我認爲最好的方式是使用CSS background-attachment。
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 */
}
-1
有CSS3描述符做到這一點:
#my-id {background-size: 100% 100%;}
http://webdesign.about.com/od/styleproperties/p/blspbgsize.htm
希望這有助於!
+0
@mattbasta ....並非所有的瀏覽器都支持... css3。 – kobe 2010-11-20 07:53:20
+0
沒有背大小!並非所有的瀏覽器都有 – user384080 2010-11-20 11:00:33
相關問題
- 1. 背景圖像CSS
- 2. CSS背景圖像
- 3. 背景圖像css
- 4. CSS背景圖像
- 5. CSS中的無圖像背景圖像
- 6. CSS:背景顏色的背景圖像
- 7. CSS重複的背景圖像的背景圖像完成
- 8. CSS背景圖像位置
- 9. 伸展CSS背景圖像
- 10. 打印CSS背景圖像
- 11. CSS背景圖像麻煩
- 12. css背景圖像漸變
- 13. 變暗CSS背景圖像
- 14. CSS背景圖像重疊
- 15. 滾動CSS背景圖像
- 16. CSS - 個人背景圖像
- 17. CSS圖像/背景縮放
- 18. CSS多圖像背景行?
- 19. CSS:背景圖像問題
- 20. CSS背景圖像查詢
- 21. 已經背景圖像css
- 22. 重置CSS背景圖像
- 23. 固定CSS背景圖像
- 24. CSS背景圖像問題
- 25. css圖像背景定位
- 26. 背景圖像覆蓋css
- 27. CSS縮放背景圖像
- 28. CSS移動背景圖像
- 29. GWT CSS背景圖像
- 30. CSS背景圖像掙扎
可能是重複的http://stackoverflow.com/questions/1112597/stretch-image-as-background – mattbasta 2010-11-20 07:09:45