标签:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <title>Jquery漂浮广告、客服代码</title> <script> $(document).ready(function() { $(window).scroll(function(){ var height = $(window).scrollTop()+100; $(‘#piao‘).stop().animate({top:height}); }) }); </script> <style> p{height:2000px;} #piao{height:400px;width:100px;right:0px;top:100px; background: #333;position: absolute;} </style> </head> <body> <p></p> <div id="piao"></div>; </body> </html>
超简单 Jquery漂浮广告、客服代码
标签:
原文地址:http://www.cnblogs.com/robotli/p/5792058.html