【发布时间】:2013-12-04 11:32:52
【问题描述】:
我的灵感来自http://www.diesel.com/bags-female。谁能解释我怎样才能达到这个效果?
我从这段代码开始:
$(document).ready(function(){
$('#background-thing').mousemove(function(e){
var mousePos = (e.pageX/$(window).width())*100;
$('#background-thing').css('backgroundPosition', mousePos+'% 0');
//alert(mousePos);
});
});
但它只平移背景图像。我希望在作为锚点的背景图像上有多个链接,单击这些图像将对特定坐标产生缩放效果。
我应该看一个 jQuery 插件吗?如果是,您有什么建议?
【问题讨论】:
-
如果你觉得它们有用的话,你可以检查一下 - lodep.com/best-free-parallax-scrolling-jquery 和 jqueryscript.net/tags.php?/parallax。
标签: javascript jquery css user-interface jquery-plugins