pulse.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  6. <title>Pulsing Box example</title>
  7. <style type="text/css" media="screen">
  8. @-webkit-keyframes pulse {
  9. 0% {
  10. background-color: red;
  11. opacity: 1.0;
  12. -webkit-transform: scale(1.0) rotate(0deg);
  13. }
  14. 33% {
  15. background-color: blue;
  16. opacity: 0.75;
  17. -webkit-transform: scale(1.1) rotate(-5deg);
  18. }
  19. 67% {
  20. background-color: green;
  21. opacity: 0.5;
  22. -webkit-transform: scale(1.1) rotate(5deg);
  23. }
  24. 100% {
  25. background-color: red;
  26. opacity: 1.0;
  27. -webkit-transform: scale(1.0) rotate(0deg);
  28. }
  29. }
  30. .pulsedbox {
  31. -webkit-animation-name: pulse;
  32. -webkit-animation-duration: 4s;
  33. -webkit-animation-iteration-count: infinite;
  34. -webkit-animation-timing-function: ease-in-out;
  35. }
  36. div {
  37. background-color: red;
  38. width: 40%;
  39. padding: 0.2em 1em;
  40. margin: 6em;
  41. }
  42. </style>
  43. </head>
  44. <body>
  45. <h1>An example of a pulsing box</h1>
  46. <div class="pulsedbox">
  47. <p>
  48. This paragraph should pulse. Pulsing is the new blink.
  49. You heard it here first.
  50. </p>
  51. </div>
  52. </body>
  53. </html>