Heim  >  Artikel  >  php教程  >  发一个简短的置顶和显示二维码的一段代码,需要的拿去

发一个简短的置顶和显示二维码的一段代码,需要的拿去

WBOY
WBOYOriginal
2016-06-07 11:41:541576Durchsuche

发一个简短的置顶和显示二维码的一段代码,需要的拿去
CSS样式的实现.left-float{position:fixed; right:40px; bottom:60px; width:40px; height:140px; z-index:10000000;}<br> .left-float .qr-code,.left-float .gototop{width:40px; height:40px; padding:10px; margin-bottom:5px; background:#FFFFFF; text-align:center; line-height:40px; font-size:40px; cursor:pointer; color:#428BCA; font-family:"微软雅黑"; font-weight:bold;}<br> .left-float .gototop{display:none;}<br> .left-float .qr-code-box{width:250px; height:250px; position:absolute; left:-250px; top:-100px; overflow:hidden; display:none;}<br> .left-float .qr-code-box img{width:250px; height:250px;}html代码的实现<!--返回顶部和二维码显示--><br> <div> <br>     <div> ※ </div> <br>     <div> <br>         <img alt="发一个简短的置顶和显示二维码的一段代码,需要的拿去" ><br>     </div> <br>     <div> ∴ </div> <br> </div>javascript代码的实现<script><br /> $(window).scroll(function(){<br /> var scrTop = $(window).scrollTop();<br /> var windowTop = $(window).height();<br /> if ((windowTop-300)<scrTop){<br /> $(".gototop").fadeIn("slow");<br /> }else{<br /> $(".gototop").fadeOut("slow");<br /> }<br /> });<br /> <br /> $(&#039;.qr-code&#039;).mouseenter(function(){<br /> $(&#039;.qr-code-box&#039;).fadeIn("slow");<br /> }).mouseleave(function(){<br /> $(&#039;.qr-code-box&#039;).fadeOut("slow");<br /> });<br /> $(&#039;#goToTop&#039;).click(function(){<br /> $(&#039;html,body&#039;).animate({scrollTop: &#039;0px&#039;}, 300);<br /> });<br /> </script>

AD:真正免费,域名+虚机+企业邮箱=0元

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn