Last active
December 24, 2016 14:10
-
-
Save YeomanYe/51eb542b9fbb91275b6cf65103021e83 to your computer and use it in GitHub Desktop.
CSS:animation elasticTransition
This file contains 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
/*效果:输入框提示元素的放大动画,过程:元素出现->元素超出大小->回到原始大小*/ | |
input:not(:focus) + .callout{ | |
/*覆盖了动画函数,动画函数使用默认值ease,同时使用修正了不同函数的动画时间*/ | |
transform:scale(0); | |
/*防止动画效果用在了,诸如背景等属性上产生异样的效果*/ | |
transition:.25s transform; | |
} | |
.callout{ | |
transform-origin:1.4em -.4em; | |
transition:.5s cubic-bezier(.25,.1,.3,1.5) transform; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment