$(window).scroll(function(){
$(".djxm").animate({top: '-320px' }, "nomal");
});
这样的 要怎么用 求教
不懂jQuery 求教怎么套用 使整屏滚动页面 滚屏时触发当前屏的动画
$(window).scroll(function(){
$(".djxm").animate({top: '-320px' }, "nomal");
});
这样的 要怎么用 求教
不懂jQuery 求教怎么套用 使整屏滚动页面 滚屏时触发当前屏的动画
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(window).scroll(function(){
$(".djxm").animate({top: $(window).scrollTop() },100);
});
</script>
</head>
<body style="height:1000px">
<div class='djxm' style="background:#98bf21;height:100px;width:100px;margin:6px;position:absolute;">
</div>
</body>
</html>