CSS-only back to top button
Create a CSS-only "Back To Top" button with a simple code
- No JavaScript
- Control when the button appears
- Smooth scroll on click
- Powered by CSS grid and sticky position
See the Pen CSS only back to top button by Temani Afif (@t_afif) on CodePen.
More detail: www.freecodecamp.org/news/css-only-back-to-top-button
More CSS Tips
- A CSS-only Speech Bubble Use CSS mask to create a speach bubble easy to adjust.
- Custom dashed border Use gradient and CSS mask to create a dashed border.
- Dashed lines using CSS gradient Ceate dashed lines using one gradient and CSS variables.
- Heart shape animation using outline Turn your image into a heart with a cool animation.