chat.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. .chat-container {
  2. font-family: Arial, sans-serif;
  3. width: 100%;
  4. background-repeat: no-repeat;
  5. background-position: center 42%;
  6. background-size: 40% auto;
  7. /*padding: 20px;*/
  8. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  9. border-radius: 10px;
  10. overflow-y: auto;
  11. border: 2px dashed #666666;
  12. position: relative;
  13. height: 600px;
  14. }
  15. .chat-container::-webkit-scrollbar {
  16. display: none; /* WebKit 浏览器 */
  17. }
  18. .chat-container-phone {
  19. font-family: Arial, sans-serif;
  20. width: 96%;
  21. background-repeat: no-repeat;
  22. background-position: center 42%;
  23. background-size: 60% auto;
  24. /*padding: 20px;*/
  25. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  26. border-radius: 10px;
  27. overflow-y: auto;
  28. border: 2px dashed #666666;
  29. position: relative;
  30. height: 600px;
  31. left: 2%;
  32. }
  33. .tips {
  34. position: sticky;
  35. top: 0px;
  36. left: 0px;
  37. width: 100%;
  38. display: block;
  39. line-height: 2rem;
  40. padding-left: 1.5rem;
  41. padding-right: 1.5rem;
  42. color: #c7254e;
  43. font-size: 1rem;
  44. background: rgba(100,100,100,0.3);
  45. z-index: 10;
  46. }
  47. .tips-phone {
  48. position: sticky;
  49. top: 0px;
  50. left: 0px;
  51. width: 100%;
  52. display: block;
  53. line-height: 1.4rem;
  54. padding-left: 0.5rem;
  55. padding-right: 0.5rem;
  56. padding-top: 0.5rem;
  57. padding-bottom: 0.5rem;
  58. color: #c7254e;
  59. font-size: 0.8rem;
  60. background: rgba(100,100,100,0.3);
  61. z-index: 10;
  62. }
  63. .message {
  64. display: flex;
  65. margin-bottom: 15px;
  66. }
  67. .avatar {
  68. width: 45px;
  69. height: 45px;
  70. border-radius: 50%;
  71. padding: 10px;
  72. }
  73. .message-content {
  74. background-color: rgba(58,58,58,0.8);
  75. padding: 10px 10px;
  76. border-radius: 10px;
  77. display: flex;
  78. flex-direction: column;
  79. align-items: flex-start;
  80. max-width: 70%;
  81. color: #8495a3;
  82. z-index: 9;
  83. }
  84. .nickname {
  85. font-weight: bold;
  86. margin-bottom: 1rem;
  87. color: #999999;
  88. }
  89. .nickname-phone {
  90. font-weight: bold;
  91. margin-bottom: 0.5rem;
  92. color: #999999;
  93. }
  94. .info{
  95. font-size: 1rem;
  96. }
  97. .info-phone{
  98. font-size: 0.9rem;
  99. margin-bottom: 0.5rem;
  100. line-height: 25px;
  101. }
  102. .time {
  103. font-size: 0.8em;
  104. color: #999999;
  105. }
  106. .time-phone {
  107. font-size: 0.8em;
  108. color: #999999;
  109. }
  110. .chatBoxOutside{
  111. bottom: 0px;
  112. width: 100%;
  113. margin: auto;
  114. left: 0;
  115. right: 0;
  116. background-color: #1b1b1b;
  117. padding: 10px 20px;
  118. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  119. border-radius: 0 0 10px 10px;
  120. height: 160px;
  121. z-index: 10;
  122. }
  123. .chatBoxExample{
  124. width: 80%;
  125. height: 30px;
  126. margin-bottom: 0.5rem;
  127. white-space: nowrap; /* 防止内容换行 */
  128. overflow-y: hidden; /* 隐藏纵向滚动条 */
  129. display: flex;
  130. scroll-behavior: smooth;
  131. overflow-x: scroll;
  132. -webkit-overflow-scrolling: touch;
  133. scrollbar-width: none; /* Firefox */
  134. -ms-overflow-style: none; /* IE/Edge */
  135. scroll-snap-type: x mandatory;
  136. scrollbar-width: none;
  137. float: left;
  138. }
  139. .chatBoxExample::-webkit-scrollbar {
  140. display: none; /* WebKit 浏览器 */
  141. }
  142. .chatBoxStop{
  143. position: relative;
  144. float: right;
  145. /*padding: 0px 10px;*/
  146. text-align: center;
  147. border-radius: 5px;
  148. height: 30px;
  149. line-height: 30px;
  150. color: #ccc;
  151. background: #3a3a3a;
  152. font-size: 0.8rem;
  153. cursor: pointer;
  154. width: 20%;
  155. border-radius: 0 20px 20px 0;
  156. }
  157. .chatBoxExample-list{
  158. flex: 0 0 auto; /* 禁止伸缩 */
  159. height: 30px;
  160. line-height: 30px;
  161. text-align: center;
  162. padding: 0 1rem;
  163. margin-right: 1rem;
  164. font-size: 0.8rem;
  165. float: left;
  166. background: #212121;
  167. border-radius: 20px;
  168. color: #999;
  169. /*max-width: 10rem;*/
  170. white-space: nowrap; /* 防止文本换行 */
  171. overflow: hidden; /* 隐藏溢出的文本 */
  172. text-overflow: ellipsis; /* 显示省略号 */
  173. cursor: pointer;
  174. display: inline-block;
  175. /*禁止选中文本*/
  176. -webkit-user-select: none; /* Chrome, Safari, Opera */
  177. -moz-user-select: none; /* Firefox */
  178. -ms-user-select: none; /* Internet Explorer/Edge */
  179. user-select: none;
  180. width: 33%;
  181. scroll-snap-align: start;
  182. display: inline-block;
  183. }
  184. .chatBoxExample-list:hover{
  185. background: #3a3a3a;
  186. }
  187. .chatBoxInside{
  188. width: 100%;
  189. height: 100px;
  190. display: block;
  191. left: 0;
  192. right: 0;
  193. }
  194. input[type="text"]{
  195. outline: none;
  196. position: relative;
  197. width: 100%;
  198. height: 100%;
  199. /* 关键修改:移除line-height,添加顶部对齐 */
  200. line-height: normal; /* 取消原有100%行高 */
  201. padding: 0px 80px 40px 20px; /* 上右下左,顶部留10px间距 */
  202. text-align: left; /* 确保文字左对齐 */
  203. vertical-align: top; /* 顶部对齐 */
  204. /* 原有其他样式保持不变 */
  205. border-radius: 10px 0 0 10px;
  206. border: none;
  207. font-size: 1rem;
  208. color: #999999;
  209. background: #212121;
  210. box-sizing: border-box;
  211. }
  212. .multiline-input {
  213. /* 基础样式保持原有input效果 */
  214. width: 100%;
  215. height: 60px; /* 固定高度 */
  216. padding: 10px 60px 10px 20px;
  217. font-size: 1rem;
  218. color: #999999;
  219. background: #212121;
  220. border: none;
  221. border-radius: 10px 0 0 10px;
  222. box-sizing: border-box;
  223. outline: none;
  224. /* 关键Hack:强制换行显示 */
  225. white-space: pre-wrap; /* 允许换行 */
  226. overflow-y: auto; /* 显示滚动条 */
  227. line-height: 1.5; /* 行高调整 */
  228. resize: none; /* 禁止拖动调整 */
  229. }
  230. /* 滚动条样式 (仅WebKit有效) */
  231. .multiline-input::-webkit-scrollbar {
  232. width: 6px;
  233. background: #3a3a3a;
  234. }
  235. .multiline-input::-webkit-scrollbar-thumb {
  236. background: #555;
  237. border-radius: 3px;
  238. }
  239. input[type="text"]:focus {
  240. outline: none;
  241. position: relative;
  242. width: 100%;
  243. left: 0%;
  244. height: 100%;
  245. line-height: 100%;
  246. border-radius: 10px 10px 10px 10px;
  247. border: none;
  248. padding-left: 20px;
  249. padding-right: 20px;
  250. padding-top: 0px;
  251. font-size: 1rem;
  252. color: #999999;
  253. float: left;
  254. background: #3a3a3a;
  255. box-sizing: border-box;
  256. }
  257. #askButton {
  258. position: absolute; /* 绝对定位 */
  259. right: 40px; /* 距离右侧10px */
  260. bottom: 40px; /* 距离底部10px */
  261. width: 60px; /* 按钮宽度 */
  262. height: 30px; /* 按钮高度 */
  263. line-height: 30px;
  264. text-align: center;
  265. color: white;
  266. border-radius: 5px;
  267. cursor: pointer;
  268. z-index: 2; /* 确保在输入框上方 */
  269. }
  270. #ragButton {
  271. position: absolute; /* 绝对定位 */
  272. left: 40px; /* 距离右侧10px */
  273. bottom: 40px; /* 距离底部10px */
  274. width: 60px; /* 按钮宽度 */
  275. height: 30px; /* 按钮高度 */
  276. line-height: 30px;
  277. text-align: center;
  278. color: white;
  279. border-radius: 5px;
  280. cursor: pointer;
  281. z-index: 2; /* 确保在输入框上方 */
  282. }
  283. .button-send {
  284. background: #6c757d;
  285. border: none;
  286. border-radius: 0 10px 10px 0;
  287. outline: none;
  288. color: #ffffff;
  289. text-align: center;
  290. height: 100%;
  291. line-height: 40px;
  292. width: 20%;
  293. float: left;
  294. font-size: 1rem;
  295. z-index: 99999;
  296. pointer-events: none;
  297. cursor: not-allowed;
  298. }
  299. /*文本排版样式*/
  300. .para-break {
  301. height: 0; /* 保持结构但隐藏元素 */
  302. margin-bottom: 0.4em;
  303. display: block;
  304. }
  305. .semi-break {
  306. margin-bottom: 0.2em;
  307. display: block;
  308. }
  309. .colon-break {
  310. margin-bottom: 0.1em;
  311. display: block;
  312. }
  313. /* 中文标点挤压优化 */
  314. :lang(zh) {
  315. text-spacing: ideograph-alpha ideograph-numeric;
  316. }
  317. /* 基础分割线样式 */
  318. .think-divider {
  319. border: 3px;
  320. height: 2px;
  321. background: linear-gradient(90deg, transparent, #ddd, transparent);
  322. margin: 1.5em 0;
  323. }
  324. .chat-br{
  325. height: 0.1em;
  326. }
  327. .chat-think{
  328. color: #007bff;
  329. margin-bottom: 1rem;
  330. text-align: right;
  331. }
  332. .chat-answer{
  333. color: #007bff;
  334. margin-bottom: 1rem;
  335. text-align: right;
  336. }
  337. /*质控采纳与否*/
  338. .quality{
  339. width: 100%;
  340. height: 40px;
  341. line-height: 40px;
  342. margin-top: 10px;
  343. }
  344. .accept{
  345. color: #007bff;
  346. float: left;
  347. cursor: pointer;
  348. }
  349. .refuse{
  350. color: #c7254e;
  351. float: right;
  352. cursor: pointer;
  353. }
  354. .color-flash {
  355. animation: colorPulse 2s infinite;
  356. }
  357. @keyframes colorPulse {
  358. 0% { background-color: #212121; }
  359. 50% { background-color: #3a3a3a; }
  360. 100% { background-color: #212121; }
  361. }
  362. /*不采纳质控的弹窗*/
  363. .alertBox{
  364. width: 100%;
  365. height: 100%;
  366. z-index: 999;
  367. background: rgba(0,0,0,0.8);
  368. position: fixed;
  369. left: 0px;
  370. top: 0px;
  371. display: none;
  372. }
  373. .alertBoxBackground{
  374. width: 100%;
  375. height: 100%;
  376. cursor: pointer;
  377. }
  378. .alertBoxChild{
  379. position: absolute;
  380. left: 50%;
  381. top: 50%;
  382. transform: translate(-50%, -50%);
  383. width: 70%;
  384. }
  385. .alertBoxInput{
  386. height: 40px;
  387. line-height: 40px;
  388. width: 80%
  389. }
  390. .alertBoxButton{
  391. background: #6c757d;
  392. border: none;
  393. border-radius: 0 10px 10px 0;
  394. outline: none;
  395. color: #ffffff;
  396. text-align: center;
  397. height: 40px;
  398. line-height: 40px;
  399. width: 20%;
  400. float: left;
  401. font-size: 1rem;
  402. z-index: 99999;
  403. cursor: pointer;
  404. }
  405. /*ajax预加载遮罩层*/
  406. .alertBoxAjax{
  407. width: 100%;
  408. height: 100%;
  409. z-index: 999;
  410. background: rgba(0,0,0,0.8);
  411. position: fixed;
  412. left: 0px;
  413. top: 0px;
  414. display: none;
  415. }
  416. .alertBoxBackgroundAjax{
  417. width: 100%;
  418. height: 100%;
  419. cursor: pointer;
  420. }
  421. .alertBoxChildAjax{
  422. position: absolute;
  423. left: 50%;
  424. top: 50%;
  425. transform: translate(-50%, -50%);
  426. width: 70%;
  427. }
  428. .alertBoxButtonAjax{
  429. background: #6c757d;
  430. border: none;
  431. border-radius: 10px 10px 10px 10px;
  432. outline: none;
  433. color: #ffffff;
  434. text-align: center;
  435. height: 40px;
  436. line-height: 40px;
  437. width: 100%;
  438. float: left;
  439. font-size: 1rem;
  440. z-index: 99999;
  441. }
  442. .ragnameBox {
  443. display: none;
  444. position: fixed;
  445. top: 0;
  446. left: 0;
  447. width: 100%;
  448. height: 100%;
  449. z-index: 9999;
  450. font-family: Arial, sans-serif;
  451. }
  452. .ragnameBoxBackground {
  453. position: absolute;
  454. width: 100%;
  455. height: 100%;
  456. background: rgba(0, 0, 0, 0.6);
  457. backdrop-filter: blur(3px);
  458. }
  459. .ragnameBoxChild {
  460. position: absolute;
  461. left: 50%;
  462. top: 50%;
  463. transform: translate(-50%, -50%);
  464. width: 80%;
  465. max-width: 400px;
  466. background: #2a2a2a;
  467. border-radius: 10px;
  468. padding: 20px;
  469. box-shadow: 0 0 20px rgba(0,0,0,0.3);
  470. animation: fadeIn 0.3s ease;
  471. }
  472. /* 输入框样式 */
  473. .ragnameBoxInput {
  474. width: 100%;
  475. height: 40px;
  476. line-height: 40px;
  477. padding: 0 15px;
  478. margin-bottom: 15px;
  479. border: 1px solid #444;
  480. border-radius: 5px;
  481. background: #333;
  482. color: #fff;
  483. font-size: 14px;
  484. outline: none;
  485. transition: all 0.3s;
  486. }
  487. .ragnameBoxInput:focus {
  488. border-color: #007bff;
  489. box-shadow: 0 0 5px rgba(0,123,255,0.5);
  490. }
  491. /* 按钮样式 */
  492. .ragnameBoxButton {
  493. background: #007bff;
  494. border: none;
  495. border-radius: 5px;
  496. color: white;
  497. text-align: center;
  498. height: 40px;
  499. line-height: 40px;
  500. width: 100%;
  501. font-size: 16px;
  502. cursor: pointer;
  503. transition: all 0.3s;
  504. }
  505. .ragnameBoxButton:hover {
  506. background: #0069d9;
  507. }
  508. /*知识库质控的弹窗*/
  509. .ragnameBox{
  510. width: 100%;
  511. height: 100%;
  512. z-index: 999;
  513. background: rgba(0,0,0,0.8);
  514. position: fixed;
  515. left: 0px;
  516. top: 0px;
  517. display: none;
  518. }
  519. .ragnameBoxBackground{
  520. width: 100%;
  521. height: 100%;
  522. cursor: pointer;
  523. }
  524. .ragnameBoxChild{
  525. position: absolute;
  526. left: 50%;
  527. top: 50%;
  528. transform: translate(-50%, -50%);
  529. width: 70%;
  530. }
  531. .ragnameBoxInput{
  532. height: 40px;
  533. line-height: 40px;
  534. width: 80%
  535. }
  536. .ragnameBoxButton{
  537. background: #6c757d;
  538. border: none;
  539. border-radius: 0 10px 10px 0;
  540. outline: none;
  541. color: #ffffff;
  542. text-align: center;
  543. height: 40px;
  544. line-height: 40px;
  545. width: 20%;
  546. float: left;
  547. font-size: 1rem;
  548. z-index: 99999;
  549. cursor: pointer;
  550. }
  551. /*ajax预加载遮罩层*/
  552. .ragnameBoxAjax{
  553. width: 100%;
  554. height: 100%;
  555. z-index: 999;
  556. background: rgba(0,0,0,0.8);
  557. position: fixed;
  558. left: 0px;
  559. top: 0px;
  560. }
  561. .ragnameBoxBackgroundAjax{
  562. width: 100%;
  563. height: 100%;
  564. cursor: pointer;
  565. }
  566. .ragnameBoxChildAjax{
  567. position: absolute;
  568. left: 50%;
  569. top: 50%;
  570. transform: translate(-50%, -50%);
  571. width: 70%;
  572. }
  573. .ragnameBoxButtonAjax{
  574. background: #6c757d;
  575. border: none;
  576. border-radius: 10px 10px 10px 10px;
  577. outline: none;
  578. color: #ffffff;
  579. text-align: center;
  580. height: 40px;
  581. line-height: 40px;
  582. width: 100%;
  583. float: left;
  584. font-size: 1rem;
  585. z-index: 99999;
  586. }