在页面的 200% 之前显示 div,之后隐藏
Show div before 200% of page and hide after
如何计算“%”的值。我想在 200% 的网站之前获得潜水表演并在之后隐藏。感谢您的任何建议!
$(window).scroll(function() {
if ($(this).scrollTop() > {percent:200})
{
$('.box').fadeOut();
}
else
{
$('.box').fadeIn();
}
});
高度乘以 2 得到 200%
$(window).scroll(function() {
if ($(this).scrollTop() > $(this).height() * 2){
$('.box').fadeOut();
}
else{
$('.box').fadeIn();
}
});
如何计算“%”的值。我想在 200% 的网站之前获得潜水表演并在之后隐藏。感谢您的任何建议!
$(window).scroll(function() {
if ($(this).scrollTop() > {percent:200})
{
$('.box').fadeOut();
}
else
{
$('.box').fadeIn();
}
});
高度乘以 2 得到 200%
$(window).scroll(function() {
if ($(this).scrollTop() > $(this).height() * 2){
$('.box').fadeOut();
}
else{
$('.box').fadeIn();
}
});