Created
August 29, 2020 17:09
-
-
Save wpflames/cd8f7ce1b1656c2a92cd5e9eed09ed95 to your computer and use it in GitHub Desktop.
Button with Direction Aware Hover Effect - SCSS
This file contains hidden or 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
| $primary: #040d15; | |
| $secondary: linear-gradient(to right, #61045F, #AA076B); | |
| *{ | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Poppins', sans-serif; | |
| } | |
| section{ | |
| background: #040d15; | |
| height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| flex-direction: column; | |
| gap: 30px; | |
| .box{ | |
| max-width: 500px; | |
| margin: 30px; | |
| .imgBx{ | |
| img{ | |
| width: 100%; | |
| margin-bottom: 30px; | |
| } | |
| } | |
| .buttons{ | |
| display: flex; | |
| justify-content: space-between; | |
| #btn-1{ | |
| background: orange; | |
| color: black; | |
| } | |
| #btn-2{ | |
| background: #0372d9; | |
| } | |
| a{ | |
| position: relative; | |
| display: inline-block; | |
| padding: 12px 30px; | |
| text-decoration: none; | |
| color: white; | |
| text-transform: uppercase; | |
| font-size: 1.2rem; | |
| border-radius: 40px; | |
| letter-spacing: 2px; | |
| overflow: hidden; | |
| width: 230px; | |
| text-align: center; | |
| span{ | |
| position: absolute; | |
| background: white; | |
| transform: translate(-50%, -50%); | |
| pointer-events: none; | |
| border-radius: 50%; | |
| animation: animate 1s linear infinite; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| @keyframes animate{ | |
| 0%{ | |
| width: 0; | |
| height: 0; | |
| opacity: .3; | |
| } | |
| 100%{ | |
| width: 500px; | |
| height: 500px; | |
| opacity: 0; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment