index.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Example</title>
  6. </head>
  7. <body>
  8. <div id="toasts-container"></div>
  9. <script src="../dist/toasters.js"></script>
  10. <style>
  11. :root {
  12. --max-width: 250px;
  13. }
  14. body {
  15. padding: 0;
  16. margin: 0;
  17. }
  18. .toast {
  19. margin-top: 5px;
  20. user-select: none;
  21. z-index: 10000 !important;
  22. animation-duration: 0.60s;
  23. animation-fill-mode: both;
  24. border-radius: 2px;
  25. cursor: pointer;
  26. clear: both;
  27. position: relative;
  28. transform: translateX(20px);
  29. height: auto;
  30. background-color: #323232;
  31. color: #fff;
  32. padding: 10px 25px;
  33. font-size: 1rem;
  34. font-weight: 300;
  35. width: var(--max-width);
  36. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  37. }
  38. .toast-right {
  39. transform: translateX(calc(100vw - (var(--max-width) + 50px) - 20px ));
  40. }
  41. .toast-left {
  42. transform: translateX(20px);
  43. }
  44. .toast-top {
  45. }
  46. .toast-bottom {
  47. }
  48. </style>
  49. </body>
  50. </html>