适合网站的背景图片屏幕大小 [英] Fit website background image to screen size

查看:523
本文介绍了适合网站的背景图片屏幕大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始在网站上,我已经遇到了一个小问题,我无法找到一个具体的解决方案。

我想使我的网站后台适合在宽屏幕任意大小,高度也无所谓。

这是链接到我的形象:

  ../IMAGES/background.jpg

修改

我不知道什么是错的,但由于某种原因身体不适,甚至想要得到的背景图像。它只是显示一个普通的白色背景。

 
{背景图像:网址(../ IMAGES / background.jpg);}


解决方案

您可以用这个插件可以做到这一点<一个href=\"http://dev.andreaseberhard.de/jquery/superbgimage/\">http://dev.andreaseberhard.de/jquery/superbgimage/

 背景图像:网址(../ IMAGES / background.jpg);   背景重复:不重复;   背景大小:盖;

无需浏览器的prefixes。这一切都准备好suporterd两个browers的

I'm just starting on a website and I already encounter a small problem where I can't find a specific solution to.

I wanted to make my website background fit any screen size in width, height does not matter.

This is the link to my image:

    ../IMAGES/background.jpg

EDIT

I have no idea what's wrong, but for some reason the body doesn't even want to get the background image. It just displays a plain white background.

body
{background-image:url(../IMAGES/background.jpg);}

解决方案

you can do this with this plugin http://dev.andreaseberhard.de/jquery/superbgimage/

or

   background-image:url(../IMAGES/background.jpg);

   background-repeat:no-repeat;

   background-size:cover;

with no need the prefixes of browsers. it's all ready suporterd in both of browers

这篇关于适合网站的背景图片屏幕大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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