Skip to content

Commit

Permalink
Add button-slide-up
Browse files Browse the repository at this point in the history
  • Loading branch information
jolaleye committed Apr 27, 2019
1 parent a76e7cb commit cb6edac
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions effects/button-slide-up.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template>
<button>Button</button>
</template>

<style scoped>
button {
z-index: 1;
position: relative;
font-size: inherit;
font-family: inherit;
color: white;
padding: 0.5em 1em;
outline: none;
border: none;
background-color: hsl(246, 45%, 15%);
}
button::before {
content: '';
z-index: -1;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: #fc2f70;
transform-origin: center top;
transform: scaleY(0);
transition: transform 0.25s ease-in-out;
}
button:hover {
cursor: pointer;
}
button:hover::before {
transform-origin: center bottom;
transform: scaleY(1);
}
</style>

0 comments on commit cb6edac

Please sign in to comment.