如何填写浏览器窗口,旋转背景图片吗? [英] How to fill browser window with rotating background Image?

查看:149
本文介绍了如何填写浏览器窗口,旋转背景图片吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想弄清楚如何填充背景图像的浏览器窗口,并有图像比例,如果用户调整浏览器窗口的屏幕。此外,我想其中有3到5个不同的图像背景图像旋转。的正是我试图做的可以看到这里的样本

I'm trying to figure out how to fill a browser window with a background image and have the image scale if the user adjusts the browser window screen. Additionally I'd like to have the background image rotate among 3 to 5 different images. A sample of EXACTLY what I'm trying to do can be seen here

样品

http://elegantthemes.com/$p$pview/InStyle/

任何帮助将大大AP preciated!

Any help would be greatly appreciated!

推荐答案

改变背景的概念很简单。这里有一个简单的例子我也通过改变身体的变化类的背景。

The concept of changing backgrounds is simple. Here's a quick example i did changing backgrounds by changing classes of body.

var bg = ['img3', 'img1', 'img2'];
$.each(bg, function(index, ui) {
    setTimeout(function() {
        $('body').removeAttr('class').addClass(ui);
    }, 2000 * index)
});

这篇关于如何填写浏览器窗口,旋转背景图片吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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