Created
December 23, 2012 21:24
-
-
Save jbail/4366249 to your computer and use it in GitHub Desktop.
A CodePen by Jeff Bail.
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><strong>Example 1</strong>: The link below will be jumpy when hovered because borders take up space and there are none defined for the "off" state.</p> | |
<p><a href="#" class="border-jumpy">I'm jumpy</a></p> | |
<p><strong>Example 2</strong>: The link below has a transparent border in the "off" state, so it won't be jumpy when hovered.</p> | |
<p><a href="#" class="border-calm">I'm calm</a></p> |
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
a { | |
display:inline-block; | |
padding:3px 12px; | |
} | |
.border-jumpy:hover { | |
border:5px dotted gray; | |
} | |
.border-calm { | |
border:5px solid transparent; | |
} | |
.border-calm:hover { | |
border:5px dotted gray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment