Created
August 1, 2017 07:40
-
-
Save ichiroku11/4ada350c4a8da8ec5d176cd71112504c to your computer and use it in GitHub Desktop.
CSS transitionを試す
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
| .container .box { | |
| background-color: #e4efff; | |
| width: 100px; | |
| margin-bottom: 10px; | |
| padding: 1em 0.1em; | |
| text-align: center; | |
| } | |
| .container:hover .box { | |
| background-color: #ffefe4; | |
| width: 300px; | |
| } | |
| .tran-ease { | |
| transition: all 1s ease 0s; | |
| } | |
| .tran-linear { | |
| transition: all 1s linear 0s; | |
| } | |
| .tran-easein { | |
| transition: all 1s ease-in 0s; | |
| } | |
| .tran-easeout { | |
| transition: all 1s ease-out 0s; | |
| } | |
| .tran-easeinout { | |
| transition: all 1s ease-in-out 0s; | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="box tran-ease"> | |
| ease | |
| </div> | |
| <div class="box tran-linear"> | |
| linear | |
| </div> | |
| <div class="box tran-easein"> | |
| ease-in | |
| </div> | |
| <div class="box tran-easeout"> | |
| ease-out | |
| </div> | |
| <div class="box tran-easeinout"> | |
| ease-in-out | |
| </div> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment