适用方法html代码
css/*share_start*/#share {position:fixed;_position:absolute;_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight)-34+"px");bottom:34px;left:95%;width:30px;zoom:1;}#share a{background-image:url(images/share.png); background-repeat:no-repeat; display:block; width:30px; height:30px; margin-bottom:2px; overflow:hidden; text-indent:-999px;-webkit-transition: all 0.2s ease-in-out;-moz-transition: all 0.2s ease-in-out;-o-transition: all 0.2s ease-in-out;-ms-transition: all 0.2s ease-in-out;transition: all 0.2s ease-in-out;}#share a{}#share .sina {background-position:0 0; position:absolute; bottom:32px;}#share a.sina:hover { background-position:-30px 0;}#share .tencent { background-position:0 -30px; position:absolute; bottom:0;}#share a.tencent:hover { background-position:-30px -30px;}#share a#totop{background-position:0 -120px;position:absolute;bottom:64px;cursor:pointer;}#share a#totop:hover {background-position:-30px -120px;}/*share_end*/js$(function(){ //首先将#back-to-top隐藏 $("#totop").hide(); //当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失 $(function () { $(window).scroll(function(){ if ($(window).scrollTop()>100){ $("#totop").fadeIn(); } else { $("#totop").fadeOut(); } }); //当点击跳转链接后,回到页面顶部位置 $("#totop").click(function(){ $('body,html').animate({scrollTop:0},500); return false; }); }); });文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)