Tip: you can modify some code before running
<!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><title>Chinese webmaster sky-webpage special effects-comprehensive special effects-effect of "back to top" on Sina waves</title><meta http-equiv="content-type" content="text/html;charset=gb2312"><!--把下面代码加到<head>与</head>之间--><style type="text/css">. BackToTop {display: none; width: 18px; line-height: 1.2; padding: 5px 0; background-color: #000; color: # fff; font-size: 12px; text-align: center; position: fixed; _ position: absolute; right: 10px; bottom: 100px; _ bottom: "auto"; cursor: pointer; opacity :. 6; filter: Alpha (opacity = 60 );}</style><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script></head><body>An error is prompted in the lower left corner of the preview result, and the effect is invisible. Refresh the page to see the effect. Of course, this problem does not occur in actual use.<br><div ></div><!--把下面代码加到<body>与</body>之间--><script type="text/javascript">(Function () {var $ backToTopTxt = "back to top", $ backToTopEle = $ ('<div class="backToTop"></div>'). AppendTo ($ ("body ")). text ($ backToTopTxt ). attr ("title", $ backToTopTxt ). click (function () {$ ("html, body "). animate ({scrollTop: 0}, 120) ;}, $ backtopfun = function () {var st = $ (document ). scrollTop (), winh = $ (window ). height (); (st> 0 )? $ BackToTopEle. show (): $ backToTopEle. hide (); // locate if (! Window. XMLHttpRequest) {export backtotopele.css ("top", st + winh-166) ;};$ (window ). bind ("scroll", $ backToTopFun); $ (function () {$ backtopfun ();});})();</script></body></html>
Tip: you can modify some code before running