首页 > 代码库 > 当到屏幕的某个位置,执行命令
当到屏幕的某个位置,执行命令
$(function()
{
$(window).scroll(function(){
if($(window).scrollTop() >= $("#sec2").offset().top-300){
$("#sec2 .squre6 h2").show().css("-webkit-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 p").show().css("-webkit-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 h2").show().css("-moz-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 p").show().css("-moz-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 h2").show().css("-ms-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 p").show().css("-ms-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 h2").show().css("-o-animation","fourtext 0.5s 1 ease-in");
$("#sec2 .squre6 p").show().css("-o-animation","fourtext 0.5s 1 ease-in");
};
});
})
当到屏幕的某个位置,执行命令