我正在使用jQuery插件plax:https://github.com/cameronmcefee/plax如何使视差响应?
我做了我自己的例子,并希望它是响应式的。现在,这个位置对于CSS中的移动元素是绝对的,但我需要它是相对的,所以我可以使它响应。
但我不能让它的工作
见我的小提琴:http://jsfiddle.net/FfKgY/
我认为这个问题是与CSS:
#shell {
display: block;
position: relative;
margin: 100px auto;
width: 100%;
max-width: 318px;
height: 100%;
max-height: 318px;
z-index: 1;
}
#plax-logo {
width: 136px;
height: 70px;
position: absolute;
top: 170px;
left: 90px;
z-index: 3;
background:#099;
}
#plax-sphere-1 {
width: 93px;
height: 92px;
position: absolute;
z-index: 4;
top: 189px;
left: 191px;
background: #3CC;
}
#plax-sphere-2 {
width: 215px;
height: 215px;
position: absolute;
z-index: 2;
top: 100px;
left: 53px;
background: #3C9;
}
#plax-sphere-3 {
width: 93px;
height: 92px;
position: absolute;
top: 35px;
left: 32px;
z-index: 1;
background: #669;
}
我知道该怎么做响应化布局。但是我似乎无法获得上面提到的视差jQuery插件来使用响应式布局。 我对jQuery并不擅长,因此我的问题在这里,所以我真的不知道在从StackOverflow的其他帖子的链接中寻找什么? – DWTBC 2013-05-01 09:03:32
编辑我的答案。 – 2013-05-01 09:20:55
所以你不认为有可能用css修复它? 我会试试这个,并让你知道它是怎么进行的 – DWTBC 2013-05-01 10:45:59