0
나는 the site을 방문했습니다. 여기에서 수평 스크롤을 볼 수 있고 레벨 4에서는 역 수직 스크롤을 볼 수 있습니다. 이것을 어떻게 할 수 있습니까? css3
을 사용하거나 JS
과 같은 다른 리소스를 사용하면됩니다.세로 역 스크롤 및 가로 스크롤
미리 감사드립니다. 당신은 같은 것을 할 수있는 jQuery를 사용하여
나는 the site을 방문했습니다. 여기에서 수평 스크롤을 볼 수 있고 레벨 4에서는 역 수직 스크롤을 볼 수 있습니다. 이것을 어떻게 할 수 있습니까? css3
을 사용하거나 JS
과 같은 다른 리소스를 사용하면됩니다.세로 역 스크롤 및 가로 스크롤
미리 감사드립니다. 당신은 같은 것을 할 수있는 jQuery를 사용하여
:
$(function() {
$("body").mousewheel(function(event, delta) {
this.scrollLeft -= (delta * 30);
event.preventDefault();
});
});
또는
을window.onscroll=function() {
var scroll = window.scrollY;
$('article').css('left', '-' + scroll + 'px');
}
는 CSS를 맞는 있는지 확인
section {
overflow:hidden;
height:1024px;
}
article {
width:1024px;/*same as section's height*/
position:fixed; /*you need this to fixe the V-scroll*/
}
article p {
float:left;
}
HTML
<section>
<article>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting </p>
</article>
</section>
답장을 보내 주셔서 감사합니다. 또한 예제 링크에서 보았 듯이 Inverse vertical scrolling에 대한 결과를 검색하고 있습니다. –
시차는 단지 배경 이미지를 움직이게합니다. –