Created
June 30, 2021 01:40
-
-
Save dongyuwei/666eb61a74dd6d3f12de7a56da3d2580 to your computer and use it in GitHub Desktop.
transition top and bottom 上下同时展开的动画效果
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
.page { | |
position: relative; | |
width: 1000px; | |
height: 800px; | |
border: 1px solid red; | |
.foo { | |
background-color: red; | |
position: absolute; | |
transition: all 2s ease 0s; | |
top: 100px; | |
bottom: 100px; | |
} | |
.foo:hover { | |
top: 0; | |
bottom: 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment