Created
October 20, 2017 20:20
-
-
Save seth10/0c0ec89e10f6b72546855ce9c205957a to your computer and use it in GitHub Desktop.
Hide "Back to top" links when printing a page
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
<p> | |
This is the top of the page. Pretend there is a ton of content here. | |
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | |
Here is the bottom. | |
Check out <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media">CSS media queries</a>. | |
</p> | |
<a href="#" class="back2top">Back to top<a> | |
<style> | |
@media print { | |
a.back2top { display: none; } | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment