mock-interviews.component.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. .chat-container {
  2. display: flex;
  3. flex-direction: column;
  4. height: calc(100vh - 120px); /* 使用Viewport单位,减去头部导航栏的高度 */
  5. .chat-window {
  6. flex-grow: 1;
  7. overflow-y: auto;
  8. border: 1px solid #ccc;
  9. padding: 10px;
  10. }
  11. .chat-label {
  12. font-weight: bold;
  13. margin-bottom: 10px;
  14. }
  15. .chat-messages {
  16. display: flex;
  17. flex-direction: column;
  18. align-items: flex-start;
  19. }
  20. .message {
  21. display: flex;
  22. align-items: center;
  23. margin-top: 10px;
  24. &.right {
  25. flex-direction: row-reverse;
  26. align-items: flex-end;
  27. }
  28. }
  29. .avatar {
  30. width: 40px;
  31. height: 40px;
  32. margin-right: 10px;
  33. img {
  34. width: 100%;
  35. height: 100%;
  36. border-radius: 50%;
  37. }
  38. }
  39. .avatar.left {
  40. align-self: flex-start;
  41. }
  42. .avatar.right {
  43. align-self: flex-end;
  44. }
  45. .avatar img {
  46. min-width: 40px;
  47. max-height: 100%;
  48. border-radius: 50%;
  49. }
  50. .content {
  51. background-color: #f1f1f1;
  52. padding: 10px;
  53. border-radius: 5px;
  54. }
  55. .left {
  56. align-self: flex-start;
  57. }
  58. .right {
  59. align-self: flex-end;
  60. }
  61. .left .content {
  62. background: cornflowerblue;
  63. }
  64. .right .content {
  65. background: lightgray;
  66. }
  67. .segmented-container {
  68. display: flex;
  69. flex-direction: column;
  70. }
  71. .input-container {
  72. display: flex;
  73. align-items: center;
  74. margin-top: auto; // 将输入框容器推到底部
  75. textarea {
  76. flex: 9; /* 输入框占据左边90% */
  77. overflow-wrap: break-word; /* 当文字超过一行宽度时自动换行 */
  78. white-space: normal; /* 允许文本换行 */
  79. }
  80. button {
  81. flex: 1; /* 发送按钮占据右边10% */
  82. margin-left: 10px; /* 添加一些间隔 */
  83. justify-self: flex-end; /* 居右对齐 */
  84. }
  85. }
  86. }