在xhtml中设置body元素的背景图像(针对不同的显示器和分辨率) [英] Setting background image for body element in xhtml (for different monitors and resolutions)

查看:157
本文介绍了在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/

希望这可以帮到你

这篇关于在xhtml中设置body元素的背景图像(针对不同的显示器和分辨率)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆