我遇到了jquery localscroll插件的问题,它似乎在除IE8之外的所有浏览器上都能正常工作。
在IE8中,它向下滚动并分开工作,不会滚动到正确的ID。
$(document).ready(function(){
$('#nav').localScroll({ duration: 2000, easing: "swing"});
//.parallax(xPosition, speedFactor, outerHeight) options:
//xPosition - Horizontal position of the element
//inertia - speed to move relative to vertical scroll. Example: 0.1 is one tenth the speed of scrolling, 2 is twice the speed of scrolling
//outerHeight (true/false) - Whether or not jQuery should use it's outerHeight option to determine when a section is in the viewport
$('.parallax__one').parallax("50%", 0.3);
$('.parallax__two').parallax("50%", 0.4);
$('.slideleft').parallax("50%", 0.4);
$('.parallax__four').parallax("50%", 0.3);
$('.parallax__five').parallax("50%", 0.6);
$('.return8').parallax("65%", 2);
});
<header class="header">
<div class="container">
<ul class="menu" id="nav">
<p class="ir header__logo"><span><a href="#one" class="js-action" date-action="one">Logo</a></span></p>
<li class="menu__list"><a href="#two" class="js-action" date-action="two">01<b>about</b></a></li>
<li class="menu__list"><a href="#three" class="js-action" date-action="three">02<b>the product</b></a></li>
<li class="menu__list"><a href="#four" class="js-action" date-action="four">03<b>the future</b></a></li>
<li class="menu__list"><a href="#five" class="js-action" date-action="five">04<b>contact</b></a></li>
</ul>
</div>