在xhtml中设置body元素的背景图像(针对不同的显示器和分辨率)

问题描述:

我对body元素中的背景图片感到困惑。

I am so confused about background image in body element.

在xhtml中设置body元素的背景图像的最佳方法是什么(针对不同的显示器和分辨率)?

What is the best way for setting a background image for the body element in xhtml (for different monitors and resolutions)?

我的意思是,当你设计一个背景(例如1024 * 768)并将它放在带有背景规则的body元素中时,我们遇到了一些问题不同的分辨率或在另一台显示器上(比设计更宽)。

I mean, when you design a background (for example 1024*768) and put it in the body element with background rule, so we have some problems in different resolution or on another monitor (so wider than designed).

如何在不用Photoshop改变图片的情况下解决这个问题?

How can I solve this issue without changing my picture with Photoshop?

我们应该用JavaScript或jQuery做些什么吗?

Shall we do something with JavaScript or jQuery?

我想你要调整背景大小以便它伸展,并始终显示全屏。
如果是这种情况,你可以使用超大尺寸: http://buildinternet.com/2009/02/supersized-full-screen-backgroundslideshow-jquery-plugin/

I think you want to resize your background so it stretches and and always shows fullscreen. If that is the case, you can use supersize: http://buildinternet.com/2009/02/supersized-full-screen-backgroundslideshow-jquery-plugin/

希望这可以帮到你