Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xiel/61441bc47a4c25ae0022 to your computer and use it in GitHub Desktop.
Save xiel/61441bc47a4c25ae0022 to your computer and use it in GitHub Desktop.
A Pen by xiel.
<span contenteditable>
Hover me and change my text
</span>
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