Welcome! 도와주세요, 제발! 스크립트가 브라우저 Internet Explorer에서 제대로 작동하지 않습니다. 스크롤하는 동안 블록을 위아래로 강하게 잡아 당깁니다. 어떻게 고치는 지? 도와주세요, 제발. 당신의 도움을 주셔서 대단히 감사합니다!브라우저 Internet Explorer에서 스크립트가 제대로 작동하지 않습니다. 어떻게 고치는 지?
$(function() {
var $hor = $("#horizontal");
$("body").css('padding-bottom', $(window).width()*2);
var delta = 0;
$(window).on('scroll', function() {
var top = $(document).scrollTop();
var width = $(window).width();
var lim = $hor.position().top - (delta) - ($(window).height() - $hor.outerHeight())/2;
delta = Math.min(Math.max(top - lim, 0), width * 2);
$(".horizontal:first", $hor).css({left : delta});
$(".horizontal:last", $hor).css({left : -(width*2 - delta)});
$("body").css({'padding-top': delta, 'padding-bottom': width*2 - delta});
});
});
p {
height: 500px;
}
#horizontal {
\t position: relative;
\t overflow: hidden;
\t width: 100%;
\t font-size: 3em;
\t margin: 0;
\t padding: 0;
\t height: 250px;
}
#horizontal .horizontal {
\t position: absolute;
\t width: 100%;
\t left: -100%;
\t padding: 20px;
}
#horizontal .horizontal .h_blockquote {
\t position: relative;
\t width: 100%;
\t margin: 0 auto;
\t font-size: 24px;
\t line-height: 1.3em;
\t color: #000;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<p>test</p>
<div id="horizontal">
<div class="horizontal">
<div class="h_blockquote">
<div class="h_blockquote_wrap">The script does not work properly in the browser Internet Explorer. The script does not work properly in the browser Internet Explorer.</div>
</div>
</div>
<div class="horizontal">
<div class="h_blockquote">
<div class="h_blockquote_wrap">The script does not work properly in the browser Internet Explorer. The script does not work properly in the browser Internet Explorer.</div>
</div>
</div>
</div>
<p>test</p>
우리는 *이 * 특정 측면에서 의미 또는 당신이 블록 #horizontal을 스크롤 할 때 Internet Explorer 브라우저의 모든 버전에서 – charlietfl
에서 테스트 한 인터넷 익스플로러의 버전은 전체를 시작합니다 "제대로 작동하지 않습니다"무슨 생각이 없다 페이지를 위아래로 "점프"합니다. – LADYX
안녕하세요, 그 예전의 버그가 있지만 jquery 스크롤 플러그인을 사용하여 해결 방법이 있습니다. 자세한 내용은 https://github.com/noraesae/perfect-scrollbar/issues/160 및 여기에서 수정하십시오. http://manos.malihu.gr/jquery-custom-content-scroller – jidexl21