Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5.  
  6. <style type="text/css">
  7.  
  8. /*this is the CSS code which sets the attributes of the div with the id of square-circle*/
  9. #square-circle{
  10. width:100px;
  11. height:100px;
  12. background-color:lightblue;
  13. animation-name:change;
  14. animation-timing-function: ease-in-out;
  15. animation-duration:2s;
  16. animation-iteration-count: infinite;
  17. }
  18.  
  19.  
  20. /*below is the name of the animation and then how we make an animation*/
  21.  
  22. @keyframes change {
  23.  
  24. 20%{
  25. background-color: lightblue;
  26. opacity:1;
  27. border-radius:0%;
  28. }
  29.  
  30. 40%{
  31. background-color: purple;
  32. opacity:0.7;
  33. border-radius:20%;
  34. }
  35.  
  36. 60%{
  37. background-color: purple;
  38. opacity:0.5;
  39. border-radius:50%;
  40. }
  41.  
  42. 80%{
  43. background-color: blue;
  44. opacity:0.7;
  45. border-radius:25%;
  46. }
  47. }
  48.  
  49. </style>
  50. </head>
  51. <body>
  52.  
  53. <div id="square-circle">
  54.  
  55. </div>
  56. </body>
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement