main.css 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .chat {
  2. display: flex;
  3. flex-direction: column-reverse;
  4. }
  5. #chatInterface {
  6. display: flex;
  7. align-items: center;
  8. margin: 20px;
  9. font-size: 16px;
  10. font-family: "Roboto", sans-serif;
  11. }
  12. #chatWindow {
  13. display: flex;
  14. flex-direction: column;
  15. width: 60vw;
  16. height: 80vh;
  17. background-color: rgb(235, 233, 233);
  18. border: 1px solid #99a3ba;
  19. margin-bottom: 15px;
  20. overflow-y: scroll;
  21. overflow-x: hidden;
  22. }
  23. #chatWindow div {
  24. display: flex;
  25. flex-direction: column;
  26. border: 1px solid rgb(185, 185, 185);
  27. max-width: fit-content;
  28. padding: 10px;
  29. margin: 10px;
  30. border-radius: 15px 15px 15px 0px;
  31. background-color: #fff;
  32. }
  33. #chatWindow div span:first-child {
  34. font-weight: bold;
  35. }
  36. #chatWindow div span:last-child {
  37. margin-top: 10px;
  38. font-size: 12px;
  39. }
  40. .nickname,
  41. .message {
  42. position: relative;
  43. }
  44. label {
  45. position: absolute;
  46. top: 12%;
  47. left: 5%;
  48. color: rgba(8, 8, 8, 0.4);
  49. transition: all 0.5s ease-in-out;
  50. }
  51. input:focus ~ label,
  52. input:valid ~ label {
  53. top: -40%;
  54. font-size: 12px;
  55. }
  56. input {
  57. padding: 5px 15px;
  58. margin-right: 10px;
  59. }
  60. input[type="text"] {
  61. border: 2px solid #99a3ba;
  62. border-radius: 8px;
  63. outline: none;
  64. }
  65. input[type="text"]:focus {
  66. box-shadow: 0 0 3px 1px rgb(163, 186, 199);
  67. }
  68. #btn {
  69. width: 70px;
  70. height: 30px;
  71. font-weight: bold;
  72. color: #fff;
  73. border: none;
  74. border-radius: 8px;
  75. background-color: #99a3ba;
  76. transition: 0.2s ease-in-out;
  77. }
  78. #btn:hover {
  79. background-color: #798cb6;
  80. transform: scale(1.05);
  81. }
  82. #btn:active {
  83. background-color: #607cb8;
  84. transform: scale(0.95);
  85. }