12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- .box{
- width: 100px;
- height: 100px;
- background-color: red;
- animation-name: foo;
- animation-duration: 1s;
- animation-timing-function: linear;
- /* animation-iteration-count: 2; */
- animation-fill-mode: forwards;
- }
- @keyframes foo {
- 0%{
- width: 100px;
- height: 100px;
- }
- 50%{
- width: 300px;
-
- }
- 100%{
- width: 300px;
- height: 300px;
- }
- }
-
- /* .div1{
- width: 0;
- height: 0;
- margin:100px auto;
- border-top: 50px solid red;
- border-left: 50px solid blue;
- border-right: 50px solid yellow;
- border-bottom: 50px solid green;
- animation-name: foo;
- animation-duration: 1s;
- animation-timing-function: linear;
- animation-iteration-count: infinite;
- animation-delay: 2s;
- } */
- /* @keyframes foo {
- from{
- transform: rotate(0);
- }
- to{
- transform: rotate(360deg);
- }
- } */
- .div1:hover{
- animation-play-state: paused;
- }
- </style>
- </head>
- <body>
- <div class="box"></div>
- <!-- <div class="div1"></div> -->
- </body>
- </html>
|