您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

jQuery网页右侧广告跟随滚动代码分享_jquery

2024/3/4 11:54:06发布29次查看
两种方法都分享给大家,希望对大家的学习有所启发。
方法一:

方法二:
/*页面智能层浮动*/ jquery(document).ready(function($){ var $sidebar = $(.float), $window = $(window), offset = $sidebar.offset(), toppadding = 20; $window.scroll(function() { if ($window.scrolltop() > offset.top) { $sidebar.stop().animate({ margintop: $window.scrolltop() - offset.top + toppadding }); } else { $sidebar.stop().animate({ margintop: 0 }); } }); }); 博主推荐 广告代码

以上就是jquery网页右侧广告跟随滚动,仿wordpress右侧广告跟随滚动,希望对大家的学习有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product