Add scrollToTop javascript function
This commit is contained in:
@@ -126,4 +126,37 @@ body {
|
||||
position:absolute;
|
||||
width: 100px;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* From http://www.trucsweb.com/tutoriels/javascript/retour-haut/ */
|
||||
a#buttonTop{
|
||||
border-radius:3px;
|
||||
padding:10px;
|
||||
font-size:3em;
|
||||
text-align:center;
|
||||
color:#fff;
|
||||
background:rgba(0, 0, 0, 0.25);
|
||||
position:fixed;
|
||||
right:3%;
|
||||
opacity:1;
|
||||
z-index:99999;
|
||||
transition:all ease-in 0.2s;
|
||||
backface-visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
text-decoration: none;
|
||||
}
|
||||
a#buttonTop:before{ content: "\25b2"; }
|
||||
a#buttonTop:hover{
|
||||
background:rgba(0, 0, 0, 1);
|
||||
transition:all ease-in 0.2s;
|
||||
}
|
||||
a#buttonTop.cInvisible{
|
||||
bottom:-35px;
|
||||
opacity:0;
|
||||
transition:all ease-in 0.5s;
|
||||
}
|
||||
|
||||
a#buttonTop.cVisible{
|
||||
bottom:20px;
|
||||
opacity:1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user