User:Spas.Z.Spasov/scroll-up-and-down-feature.css
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/**
* Scroll Up and Down Feature
* [single] and [double] mouse click, also [Ctrl]+[Arrows] are available
*
* @author Spas Zdravkov Spasov <spas.z.spasov@gmail.com> (c) 2019
**/
html {
scroll-behavior: smooth;
}
#goUpDownContainer {
display: none;
position: fixed;
bottom: 2px;
margin-bottom: 18px;
margin-left: 20px;
text-align: -webkit-center;
}
#goDownButton:focus, #goDownButton, #goUpButton:focus, #goUpButton {
position: relative;
outline: none;
background-color: rgba(255,255,255,0.65);
color: rgba(220,220,220,1);
cursor: pointer;
height: 36px;
width: 36px;
font-size: 24px;
line-height: 7px;
text-align: center;
transition: .5s;
font-family: monospace;
text-align: -webkit-center;
vertical-align: middle;
}
#goUpButton {
border: 1px solid rgba(220,220,220,0.65);
float: left;
border-top-left-radius: 50%;
border-bottom-left-radius: 50%;
border-right-color: transparent;
padding: 0 0 1px 2px;
}
#goDownButton {
border: 1px solid rgba(220,220,220,0.65);
float: left;
border-top-right-radius: 50%;
border-bottom-right-radius: 50%;
border-left-color: transparent;
padding: 1px 2px 0 0;
right: 2px;
}
#goDownButton:hover,
#goUpButton:hover {
background-color: #fff;
transition: .5s;
border: 1px solid rgba(111,161,253,.65);
color: rgba(111,161,253,.85);
-webkit-box-shadow: 1px 1px 8px rgba(120,120,120,.2);
-moz-box-shadow: 1px 1px 8px rgba(120,120,120,.2);
box-shadow: 1px 1px 8px rgba(120,120,120,.2);
z-index: 10;
}
#goDownButton:active,
#goUpButton:active {
background-color: #fafafa;
transition: .3s;
border: 1px inset rgba(111,161,253,.65);
color: rgba(111,161,253,.85);
-webkit-box-shadow: 1px 1px 8px rgba(120,120,120,.2);
-moz-box-shadow: 1px 1px 8px rgba(120,120,120,.2);
box-shadow: 1px 1px 8px rgba(120,120,120,.2);
}
svg.svg-inline--fa.fa-angle-down.fa-w-10.fa-3x,
svg.svg-inline--fa.fa-angle-up.fa-w-10.fa-3x {
height: 26px;
}
@media print {
#goUpDownContainer,
#goDownButton,
#goUpButton {
display: none !important;
}
}