我有3个不同的背景图像,我想一个接一个地水平添加它们。水平添加背景图像
#bgwrap{width:100%;height:100%; overflow:hidden;}
#bg1{width:1000px;height:100%; background: #000 url(bg1.jpg) no-repeat center top;}
#bg2{width:1000px;height:100%; background: #000 url(bg2.jpg) no-repeat center top;}
#bg3{width:1000px;height:100%; background: #000 url(bg3.jpg) no-repeat center top;}
我可以在以后使用jquery挑仅观看开始宽度= 1001PX到2000像素时,我想看到的第二背景。 那么如何将它们添加到一个类或ID中,以便我可以使用jquery来选择它?
当你说它们添加一个后anothe水平方向,你的意思是在页面加载时,或者当某人向左(或向右)滚动并将其引入视图时? –
将这些图像url路径保存在一个数组中。然后使用jquery从数组中选择图像路径。 –
是的,我想要水平添加它们的原因是因为我想向左或向右滚动它们 – Pat