index.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>SVG</title>
  6. <script type="module" src="./index.js"></script>
  7. <style>
  8. body {
  9. background: #fafafa;
  10. font-family: sans-serif;
  11. }
  12. h1 {
  13. font-weight: normal;
  14. }
  15. .btn {
  16. display: inline-block;
  17. cursor: pointer;
  18. background: #fff;
  19. box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  20. padding: 0.5em 0.8em;
  21. transition: box-shadow 0.05s ease-in-out;
  22. -webkit-transition: box-shadow 0.05s ease-in-out;
  23. }
  24. .btn:hover {
  25. box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  26. }
  27. .btn:active,
  28. .active,
  29. .active:hover {
  30. box-shadow: 0 0 1px rgba(0, 0, 0, 0.2), inset 0 0 4px rgba(0, 0, 0, 0.1);
  31. }
  32. .add {
  33. float: right;
  34. }
  35. #container {
  36. max-width: 42em;
  37. margin: 0 auto 2em auto;
  38. }
  39. .list {
  40. position: relative;
  41. }
  42. .row {
  43. overflow: hidden;
  44. position: absolute;
  45. box-sizing: border-box;
  46. width: 100%;
  47. left: 0px;
  48. margin: 0.5em 0;
  49. padding: 1em;
  50. background: #fff;
  51. box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  52. transition: transform 0.5s ease-in-out, opacity 0.5s ease-out,
  53. left 0.5s ease-in-out;
  54. -webkit-transition: transform 0.5s ease-in-out, opacity 0.5s ease-out,
  55. left 0.5s ease-in-out;
  56. }
  57. .row div {
  58. display: inline-block;
  59. vertical-align: middle;
  60. }
  61. .row > div:nth-child(1) {
  62. width: 5%;
  63. }
  64. .row > div:nth-child(2) {
  65. width: 30%;
  66. }
  67. .row > div:nth-child(3) {
  68. width: 65%;
  69. }
  70. .rm-btn {
  71. cursor: pointer;
  72. position: absolute;
  73. top: 0;
  74. right: 0;
  75. color: #c25151;
  76. width: 1.4em;
  77. height: 1.4em;
  78. text-align: center;
  79. line-height: 1.4em;
  80. padding: 0;
  81. }
  82. </style>
  83. </head>
  84. <body>
  85. <div id="container"></div>
  86. </body>
  87. </html>