Created
November 14, 2012 23:24
-
-
Save xiel/4075566 to your computer and use it in GitHub Desktop.
Pseudo-Element Transition Webkit Bug Fix
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
/* | |
Pseudo-Element Transition Webkit Bug Fix | |
*/ | |
a { | |
transition: 500ms; /* only the parent element needs the transition */ | |
} | |
a { | |
position: relative; | |
border: 0 none; | |
border-color: #f26 transparent; /* the transitioned value, inherited by the pseudo element */ | |
border-radius: 5px; | |
padding: 10px 20px; | |
font: 16px/1 sans-serif; | |
line-height: 1em; | |
color: #fff; | |
background: #f26; | |
} | |
a:hover { | |
background: #dd0; | |
border-color: #dd0 transparent; /* changed hover value */ | |
} | |
a:after { | |
display: block; | |
position: absolute; | |
left: 50%; | |
margin-left: -10px; | |
bottom: -10px; | |
content: ''; | |
border-style: solid; | |
border-width: 10px 10px 0 10px; | |
border-color: inherit; /* inherit the transition */ | |
} | |
body { | |
padding: 30px; | |
} |
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>Button with pseudo</a> |
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
{"view":"split","fontsize":"110","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment