Last active
August 15, 2020 18:42
-
-
Save helart/bd4f2822a2e3753633c4 to your computer and use it in GitHub Desktop.
Botton UP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
.b-top {z-index:2600;position:fixed;left:0;bottom:90px;width:34%;margin-left:50%;opacity: 0.5;filter:alpha(opacity=50);} | |
.b-top:hover {opacity:1;filter:alpha(opacity=100);cursor:pointer;} | |
.b-top-but {z-index:2600;position:absolute;display:block;left:56px;bottom:0;margin:0 0 0 100%;padding:32px 12px 4px; | |
color:white;background:#D8D5C2 url(http://alaev.info/wp-content/plugins/goupbutt/b-j-top.png) no-repeat 50% 11px;border-radius:7px;} | |
</style> | |
<script type="text/javascript">$(document).ready(function(){ | |
$(window).scroll(function () {if ($(this).scrollTop() > 0) {$('#scroller').fadeIn();} else {$('#scroller').fadeOut();}}); | |
$('#scroller').click(function () {$('body,html').animate({scrollTop: 0}, 400); return false;}); | |
});</script> | |
</head> | |
<body> | |
<div id="scroller" class="b-top" style="display: none;"><span class="b-top-but">наверх</span></div> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment