index.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Socket.IO chat</title>
  5. <style>
  6. body {
  7. margin: 0;
  8. padding-bottom: 3rem;
  9. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
  10. Helvetica, Arial, sans-serif;
  11. }
  12. #form {
  13. background: rgba(0, 0, 0, 0.15);
  14. padding: 0.25rem;
  15. position: fixed;
  16. bottom: 0;
  17. left: 0;
  18. right: 0;
  19. display: flex;
  20. height: 3rem;
  21. box-sizing: border-box;
  22. backdrop-filter: blur(10px);
  23. }
  24. #input {
  25. border: none;
  26. padding: 0 1rem;
  27. flex-grow: 1;
  28. border-radius: 2rem;
  29. margin: 0.25rem;
  30. }
  31. #input:focus {
  32. outline: none;
  33. }
  34. #form > button {
  35. background: #333;
  36. border: none;
  37. padding: 0 1rem;
  38. margin: 0.25rem;
  39. border-radius: 3px;
  40. outline: none;
  41. color: #fff;
  42. }
  43. #messages {
  44. list-style-type: none;
  45. margin: 0;
  46. padding: 0;
  47. }
  48. #messages > li {
  49. padding: 0.5rem 1rem;
  50. }
  51. #messages > li:nth-child(odd) {
  52. background: #efefef;
  53. }
  54. </style>
  55. </head>
  56. <body>
  57. <ul id="messages"></ul>
  58. <form id="form" action="">
  59. <input id="input" autocomplete="off" /><button>Send</button>
  60. </form>
  61. </body>
  62. </html>