Last active
August 29, 2015 14:23
-
-
Save williankeller/c61d05097cbfa99e4018 to your computer and use it in GitHub Desktop.
Efeito no clique do botão (Efeito Android Lollipop)
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
| function efeito(t, e) { | |
| var a = '.efeito', | |
| c = '<span class="efeito"></span>'; | |
| t.append(c); | |
| $(a).css({'top': e.offsetY, 'left': e.offsetX}); | |
| setTimeout(function () { | |
| $(a).remove(); | |
| }, 1100); | |
| } | |
| @keyframes cliqueEfeito { | |
| from { | |
| opacity: 0.7; | |
| transform: scale(0); | |
| } | |
| to { | |
| opacity: 0; | |
| transform: scale(2); | |
| } | |
| } | |
| @-webkit-keyframes cliqueEfeito { | |
| from { | |
| opacity: 0.7; | |
| transform: scale(0); | |
| } | |
| to { | |
| opacity: 0; | |
| transform: scale(2); | |
| } | |
| } | |
| .btn { | |
| position:relative | |
| } | |
| .efeito { | |
| margin: -100px; | |
| width: 200px; | |
| height: 200px; | |
| border-radius: 100px; | |
| position: absolute; | |
| background: rgba(255, 255, 255, 0.5); | |
| transform: scale(0); | |
| pointer-events: none; | |
| animation: cliqueEfeito 1s ease; | |
| -webkit-animation: cliqueEfeito 1s ease; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment