index.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta
  5. name="viewport"
  6. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
  7. />
  8. <meta charset="utf-8" />
  9. <title>Carousel</title>
  10. <script type="module" src="./index.js"></script>
  11. <style type="text/css">
  12. div.view {
  13. margin: 10px;
  14. }
  15. h1 {
  16. font-size: 24px;
  17. color: #505000;
  18. }
  19. svg {
  20. display: block;
  21. margin-bottom: 10px;
  22. border: 1px solid gray;
  23. }
  24. g#carousel {
  25. -webkit-transition: -webkit-transform 1s ease;
  26. transition: transform 1s ease;
  27. }
  28. polygon {
  29. stroke: #808000;
  30. transition: fill 0.5s linear;
  31. }
  32. polygon#yellow {
  33. fill: rgba(255, 255, 0, 0.4);
  34. }
  35. polygon#yellow:hover,
  36. polygon#yellow:active {
  37. fill: yellow;
  38. }
  39. polygon#green {
  40. fill: rgba(0, 128, 0, 0.4);
  41. }
  42. polygon#green:hover,
  43. polygon#green:active {
  44. fill: green;
  45. }
  46. polygon#magenta {
  47. fill: rgba(255, 0, 255, 0.4);
  48. }
  49. polygon#magenta:hover,
  50. polygon#magenta:active {
  51. fill: magenta;
  52. }
  53. polygon#red {
  54. fill: rgba(255, 0, 0, 0.4);
  55. }
  56. polygon#red:hover,
  57. polygon#red:active {
  58. fill: red;
  59. }
  60. polygon#cyan {
  61. fill: rgba(0, 255, 255, 0.4);
  62. }
  63. polygon#cyan:hover,
  64. polygon#cyan:active {
  65. fill: cyan;
  66. }
  67. polygon#blue {
  68. fill: rgba(0, 0, 255, 0.4);
  69. }
  70. polygon#blue:hover,
  71. polygon#blue:active {
  72. fill: blue;
  73. }
  74. button {
  75. font-size: 15px;
  76. margin: 0 0.7em 0.7em 0;
  77. }
  78. </style>
  79. </head>
  80. <body>
  81. <div id="container"></div>
  82. </body>
  83. </html>