Created
August 27, 2014 10:38
-
-
Save xiel/61441bc47a4c25ae0022 to your computer and use it in GitHub Desktop.
A Pen by xiel.
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
<span contenteditable> | |
Hover me and change my text | |
</span> |
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
body { | |
font-family: sans-serif; | |
} | |
span { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
color: #333; | |
padding: 5px 0; | |
text-align: center; | |
transition: 200ms; | |
&:after { | |
content: ' '; | |
position: absolute; | |
display: block; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
margin: auto; | |
width: 100%; | |
height: 0; | |
border-radius: 50%; | |
padding-bottom: 100%; | |
background: blue; | |
z-index: -1; | |
transform: scale(0); | |
transition: inherit; | |
background: #ccc; | |
} | |
&:hover { | |
color: #fff; | |
&:after { | |
transform: scale(1.3); | |
background: #C5244D; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment