Skip to content

Instantly share code, notes, and snippets.

@Lego2012
Created January 11, 2025 07:57
Show Gist options
  • Select an option

  • Save Lego2012/2eec713370cc69aa38a96e1d532fff38 to your computer and use it in GitHub Desktop.

Select an option

Save Lego2012/2eec713370cc69aa38a96e1d532fff38 to your computer and use it in GitHub Desktop.
// https://wagepirate.com/blog/back-to-top-button-bricks/
/**
There needs to be an empty div before the header. See in Misc folder ‘Empty div before header‘
**/
.bricks-is-frontend .backtotop {
opacity: 0;
visibility: hidden;
}
.backtotop[show="true"]{
animation: fadeIn 0.5s;
animation-fill-mode: forwards;
}
@keyframes fadeIn {
0% {opacity: 0;visibility: hidden;}
100% {opacity: 1;visibility: visible;}
}
.backtotop[show="false"] {
animation: fadeOut 0.5s;
animation-fill-mode: forwards;
}
@keyframes fadeOut {
0% {opacity: 1;visibility: visible;}
100% {opacity: 0;visibility: hidden;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment