javascript - How to make a PC website appear dynamically as the mouse scrolls
習慣沉默
習慣沉默 2017-06-13 09:24:09
0
6
968

This is the demo URL: http://demo.cssmoban.com/csst...
How to make the content in the web page dynamically appear when the mouse ball slides

習慣沉默
習慣沉默

reply all(6)
刘奇

You can use some third-party development libraries such as wow.js, or you can make your own

代言

According to the scroll bar on the right, when it reaches the specified position, it will be displayed and the corresponding dynamic effect code will be executed.

三叔

Monitor the scroll height and add CSS3 style

仅有的幸福

This just adds a scrolling monitor. Scroll to the corresponding position to change the opacity of the corresponding position from 0 to 1, as well as some other css properties. These styles have added animation effects.

过去多啦不再A梦

It is necessary to add a monitoring scroll event, and use the listening results to determine whether to obtain it asynchronously or add or display the existing but not displayed parts

洪涛

//Mouse scroll event
$(window).scroll(function(){

//获取当前滚动条距离顶部的高度
var scrollTop = $(this).scrollTop();  
//定义你动画动画应该在滚动条在哪个高度以上显示  假设200px;
if(scrollTop>200){
    //你的动画效果函数
}

}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template