摘要:
点击返回顶部按钮,页面滑动形式回到顶部! HTML代码: <div id="ctop">回到<br>顶部</div> CSS代码: #ctop{width:45px; height:45px; position: fixed; left:50%; bottom:120px; border:solid 阅读全文
posted @ 2016-11-21 17:33
知乎其微
阅读(491)
评论(1)
推荐(1)
摘要:
$(function(){ $(window).scroll(function(){ var top=$(this).scrollTop(); $(".abc").css({transform:"translate3d(0px,"+-(top/3)+"px,0px)"})//需要设置视差的元素 }) 阅读全文
posted @ 2016-11-21 17:23
知乎其微
阅读(1069)
评论(1)
推荐(0)

浙公网安备 33010602011771号