Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Created January 25, 2017 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeMyUI/0acb0e81a3e344dbe87d69638e5a7333 to your computer and use it in GitHub Desktop.
Save CodeMyUI/0acb0e81a3e344dbe87d69638e5a7333 to your computer and use it in GitHub Desktop.
Pop Up Button Idea
<div class="overflow-hide">
<div class="hole"></div>
<div class="button">Pop up button</div>
</div>
body {
background: tomato;
}
.overflow-hide {
height: 60px;
width: 190px;
display: block;
margin: 150px auto;
overflow: hidden;
position: relative;
}
.hole {
content: "";
display: block;
width: 190px;
position: absolute;
bottom: 0;
margin: 0 auto;
height: 10px;
border-radius: 20px;
background: black;
z-index: 0;
}
.button {
height: 60px;
width: 180px;
text-align: center;
line-height: 1.8;
color: white;
display: block;
position: relative;
background-color: #105f98;
margin: 0 auto;
transform: translateY(30px);
transition: transform 200ms ease-in-out;
&:after {
content: "";
display: block;
position: absolute;
width: 180px;
height: 5px;
background: black;
bottom: 0;
transform: translateY(-30px);
transition: transform 200ms ease-in-out;
}
&:hover {
transform: translateY(0);
&:after {
transform: translateY(0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment