fastchat.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. :root {
  2. --white: #fff;
  3. --black: #000;
  4. --bg: #f8f8f8;
  5. --grey: #999;
  6. --dark: #1a1a1a;
  7. --light: #e6e6e6;
  8. --wrapper: 100%;
  9. --blue: #00b0ff;
  10. }
  11. .chat-wrapper {
  12. position: relative;
  13. left: 50%;
  14. width: var(--wrapper);
  15. height: 620px;
  16. transform: translate(-50%, 0);
  17. -webkit-transform: translate(-50%, 0);
  18. }
  19. .chat-container {
  20. position: relative;
  21. top: 50%;
  22. left: 50%;
  23. width: 100%;
  24. height: 100%;
  25. background-color: var(--white);
  26. transform: translate(-50%, -50%);
  27. -webkit-transform: translate(-50%, -50%);
  28. }
  29. .chat-container .left {
  30. position: relative;
  31. float: left;
  32. width: 37%;
  33. height: 100%;
  34. border: 1px solid var(--light);
  35. background-color: var(--white);
  36. }
  37. .chat-container .left .top {
  38. position: relative;
  39. width: 100%;
  40. height: 96px;
  41. padding: 29px 12px;
  42. }
  43. .chat-container .left input {
  44. float: left;
  45. width: 100%;
  46. height: 42px;
  47. padding: 0 15px;
  48. border: 1px solid var(--light);
  49. background-color: #eceff1;
  50. border-radius: 21px;
  51. font-family: 'Source Sans Pro', sans-serif;
  52. font-weight: 400;
  53. }
  54. .chat-container .left input:focus {
  55. outline: none;
  56. }
  57. .chat-container .left a.search {
  58. display: block;
  59. float: left;
  60. width: 42px;
  61. height: 42px;
  62. margin-left: 10px;
  63. border: 1px solid var(--light);
  64. background-color: var(--blue);
  65. background-image: url("../img/name-type.png");
  66. background-repeat: no-repeat;
  67. background-position: top 12px left 14px;
  68. border-radius: 50%;
  69. }
  70. .chat-container .left .people {
  71. margin-left: -1px;
  72. border-right: 1px solid var(--light);
  73. border-left: 1px solid var(--light);
  74. width: calc(100% + 2px);
  75. height: 84%;
  76. overflow-x: hidden;
  77. overflow-y: auto;
  78. }
  79. .chat-container .left .people::-webkit-scrollbar,.chat_scroll::-webkit-scrollbar,.search_users::-webkit-scrollbar {
  80. width: 4px;
  81. }
  82. .chat-container .left .people::-webkit-scrollbar-track,.chat_scroll::-webkit-scrollbar-track,.search_users::-webkit-scrollbar-track {
  83. background-color:#fff;
  84. -webkit-border-radius: 2em;
  85. -moz-border-radius: 2em;
  86. border-radius:2em;
  87. }
  88. .chat-container .left .people::-webkit-scrollbar-thumb,.chat_scroll::-webkit-scrollbar-thumb {
  89. background-color:#e6e6e6;
  90. -webkit-border-radius: 2em;
  91. -moz-border-radius: 2em;
  92. border-radius:2em;
  93. }
  94. .chat-container .left ul{
  95. list-style:none;
  96. padding: 0;
  97. margin: 0;
  98. }
  99. .chat-container .left .people .person {
  100. position: relative;
  101. width: 100%;
  102. padding: 12px 10% 16px;
  103. cursor: pointer;
  104. background-color: var(--white);
  105. }
  106. .chat-container .left .people .person:after {
  107. position: absolute;
  108. bottom: 0;
  109. left: 50%;
  110. display: block;
  111. width: 80%;
  112. height: 1px;
  113. content: '';
  114. background-color: var(--light);
  115. transform: translate(-50%, 0);
  116. -webkit-transform: translate(-50%, 0);
  117. }
  118. .chat-container .left .people .person img {
  119. float: left;
  120. width: 40px;
  121. height: 40px;
  122. margin-right: 12px;
  123. border-radius: 50%;
  124. }
  125. .chat-container .left .people .person .person_head_gray {
  126. -webkit-filter: grayscale(100%);
  127. -moz-filter: grayscale(100%);
  128. -ms-filter: grayscale(100%);
  129. -o-filter: grayscale(100%);
  130. filter: grayscale(100%);
  131. filter: gray;
  132. }
  133. .chat-container .left .people .person .session_info_item{
  134. display: flex;
  135. height: 24px;
  136. overflow: hidden;
  137. justify-content: space-between;
  138. }
  139. .chat-container .left .people .person .name {
  140. width: 60%;
  141. overflow: hidden;
  142. font-size: 14px;
  143. color: var(--dark);
  144. font-family: 'Source Sans Pro', sans-serif;
  145. font-weight: 600;
  146. display: inline-block;
  147. }
  148. .chat-container .left .people .person .time {
  149. font-size: 14px;
  150. padding-top: 2px;
  151. color: var(--grey);
  152. background-color: var(--white);
  153. }
  154. .chat-container .left .people .person .preview {
  155. width: 60%;
  156. white-space: nowrap;
  157. text-overflow: ellipsis;
  158. color: var(--grey);
  159. }
  160. .chat-container .left .people .person .unread_msg_count {
  161. height: 17px;
  162. margin-top: 1.5px;
  163. padding: 0 5px;
  164. background: #f74c31;
  165. text-align: center;
  166. line-height: 17px;
  167. border-radius: 50%;
  168. color: var(--white);
  169. }
  170. .chat-container .left .people .person .count_hide{
  171. display: none;
  172. }
  173. .chat-container .left .people .person.active .unread_msg_count, .chat-container .left .people .person:hover .unread_msg_count{
  174. color: var(--white);
  175. background: #f74c31;
  176. }
  177. .chat-container .left .people .person.active, .chat-container .left .people .person:hover {
  178. margin-top: -1px;
  179. margin-left: -1px;
  180. padding-top: 13px;
  181. border: 0;
  182. background-color: var(--blue);
  183. width: calc(100% + 2px);
  184. padding-left: calc(10% + 1px);
  185. }
  186. .chat-container .left .people .person.active span, .chat-container .left .people .person:hover span {
  187. color: var(--white);
  188. background: transparent;
  189. }
  190. .chat-container .left .people .person.active:after, .chat-container .left .people .person:hover:after {
  191. display: none;
  192. }
  193. .chat-container .right {
  194. position: relative;
  195. float: left;
  196. width: 62.4%;
  197. height: 100%;
  198. }
  199. .chat-container .right .top {
  200. width: 100%;
  201. height: 47px;
  202. padding: 15px 29px;
  203. background-color: #eceff1;
  204. }
  205. .chat-container .right .top span {
  206. font-size: 15px;
  207. color: var(--grey);
  208. vertical-align: middle;
  209. }
  210. .chat-container .right .top span .name {
  211. color: var(--dark);
  212. font-family: 'Source Sans Pro', sans-serif;
  213. font-weight: 600;
  214. overflow: hidden;
  215. display: inline-block;
  216. text-overflow:ellipsis;
  217. white-space: nowrap;
  218. max-width: 60%;
  219. }
  220. .chat-container .right .top span .shielding {
  221. font-family: 'Source Sans Pro', sans-serif;
  222. margin-left: 10px;
  223. color: var(--blue);
  224. font-size: 13px;
  225. cursor:pointer;
  226. }
  227. .chat-container .right .top span #error_warning {
  228. font-family: 'Source Sans Pro', sans-serif;
  229. margin-left: 10px;
  230. color: #e64340;
  231. font-size: 13px;
  232. }
  233. .chat-container .right .chat {
  234. position: relative;
  235. display: none;
  236. overflow: hidden;
  237. padding: 0 0 110px 0;
  238. border-width: 1px 1px 1px 0;
  239. border-style: solid;
  240. border-color: var(--light);
  241. height: calc(100% - 47px);
  242. justify-content: flex-end;
  243. flex-direction: column;
  244. }
  245. .chat-container .right .chat_scroll{
  246. overflow-y:auto;
  247. overflow-x:hidden;
  248. padding: 20px;
  249. }
  250. .chat-container .right .chat.active-chat {
  251. display: flex;
  252. }
  253. .chat-container .right .chat.active-chat .bubble {
  254. word-break: break-all;
  255. word-wrap: break-word;
  256. }
  257. .chat_button_popover{
  258. position: fixed;
  259. word-break: break-all;
  260. word-wrap: break-word;
  261. }
  262. .chat-container .right .write {
  263. position: absolute;
  264. bottom: 10px;
  265. left: 4%;
  266. height: 100px;
  267. padding: 8px;
  268. border: 1px solid var(--light);
  269. background-color: #eceff1;
  270. width: 92%;
  271. border-radius: 5px;
  272. }
  273. .chat-container .right .chat_emoji{
  274. position: absolute;
  275. bottom: 100px;
  276. left: 2%;
  277. padding: 8px;
  278. border: 1px solid var(--light);
  279. width: 96%;
  280. display: none;
  281. border-radius: 5px;
  282. background: #fff;
  283. z-index: 1070;
  284. }
  285. .chat-container .right .chat_emoji img{
  286. height: 30px;
  287. width: 30px;
  288. padding: 4px;
  289. }
  290. .chat-container .right .chat_emoji img:hover{
  291. border: 1px solid #f2f2f2;
  292. }
  293. .chat-container .right .write pre {
  294. font-size: 16px;
  295. float: left;
  296. width: 100%;
  297. height: 60px;
  298. overflow-y: auto;
  299. overflow-x: hidden;
  300. margin: 0;
  301. padding: 0;
  302. border: 0;
  303. padding-left: 2px;
  304. white-space: pre-wrap;
  305. word-break: normal;
  306. color: var(--dark);
  307. outline: none;
  308. background-color: #eceff1;
  309. font-family: 'Source Sans Pro', sans-serif;
  310. font-weight: 400;
  311. }
  312. .chat-container .right .write .write_top{
  313. height: 24px;
  314. }
  315. .chat-container .right .write .smiley {
  316. display: inline-block;
  317. width: 20px;
  318. height: 20px;
  319. content: '';
  320. background-image: url("../img/smiley.png");
  321. background-repeat: no-repeat;
  322. background-position: center;
  323. vertical-align: middle;
  324. }
  325. .chat-container .right .write .select_file{
  326. display: inline-block;
  327. width: 20px;
  328. height: 20px;
  329. margin-left: 10px;
  330. vertical-align: middle;
  331. position:relative;
  332. }
  333. .chat-container .right .write #chatfile{
  334. filter:alpha(opacity=0);
  335. opacity: 0;
  336. width: 20px;
  337. height: 20px;
  338. display: inline-block;
  339. position:absolute;
  340. z-index: 2;
  341. text-indent: -9999px;
  342. }
  343. .chat-container .right .write .attach {
  344. display: inline-block;
  345. position:absolute;
  346. width: 20px;
  347. height: 20px;
  348. content: '';
  349. background-image: url("../img/attachment.png");
  350. background-repeat: no-repeat;
  351. background-position: center;
  352. vertical-align: middle;
  353. z-index: 1;
  354. }
  355. .chat-container .right .write #send_tis{
  356. display: inline-block;
  357. height: 20px;
  358. font-size: 14px;
  359. line-height: 20px;
  360. margin-left: 10px;
  361. vertical-align: middle;
  362. color: #999;
  363. }
  364. .chat-container .right .fastchat_footer .send{
  365. float: right;
  366. }
  367. .chat-container .right .bubble {
  368. font-size: 16px;
  369. position: relative;
  370. display: inline-block;
  371. clear: both;
  372. margin-bottom: 8px;
  373. padding: 13px 14px;
  374. vertical-align: top;
  375. border-radius: 5px;
  376. }
  377. .chat-container .right .bubble:before {
  378. position: absolute;
  379. top: 19px;
  380. display: block;
  381. width: 8px;
  382. height: 6px;
  383. content: '\00a0';
  384. transform: rotate(29deg) skew(-35deg);
  385. -webkit-transform: rotate(29deg) skew(-35deg);
  386. }
  387. .chat-container .right .bubble.you {
  388. float: left;
  389. color: var(--dark);
  390. background-color: #eceff1;
  391. align-self: flex-start;
  392. }
  393. .chat-container .right .bubble.you:before {
  394. left: -3px;
  395. background-color: #eceff1;
  396. }
  397. .chat-container .right .bubble.you img{
  398. background: #fff;
  399. max-width: 200px;
  400. }
  401. .chat-container .right .bubble.you a{
  402. color: var(--dark);
  403. text-decoration: underline;
  404. font-size: 14px;
  405. }
  406. .chat-container .right .bubble.me {
  407. float: right;
  408. color: var(--white);
  409. background-color: var(--blue);
  410. align-self: flex-end;
  411. }
  412. .chat-container .right .bubble.me img{
  413. background: var(--white);
  414. max-width: 200px;
  415. }
  416. .chat-container .right .bubble.me a{
  417. color: var(--white);
  418. text-decoration: underline;
  419. font-size: 14px;
  420. }
  421. .chat-container .right .bubble.me:before {
  422. right: -3px;
  423. background-color: var(--blue);
  424. }
  425. .chat-container .right .conversation-start {
  426. position: relative;
  427. float: right;
  428. width: 100%;
  429. margin: 20px 0;
  430. text-align: center;
  431. }
  432. .chat-container .right .conversation-start span {
  433. font-size: 14px;
  434. display: inline-block;
  435. color: var(--grey);
  436. }
  437. .chat-container .right .conversation-start span:before, .chat-container .right .conversation-start span:after {
  438. position: absolute;
  439. top: 10px;
  440. display: inline-block;
  441. width: 30%;
  442. height: 1px;
  443. content: '';
  444. background-color: var(--light);
  445. }
  446. .chat-container .right .conversation-start span:before {
  447. left: 0;
  448. }
  449. .chat-container .right .conversation-start span:after {
  450. right: 0;
  451. }
  452. /*搜索预选*/
  453. .chat-container .left .search_users{
  454. display: none;
  455. position: absolute;
  456. top: 96px;
  457. margin-left: -1px;
  458. width: 100%;
  459. height: 84%;
  460. background: #fff;
  461. line-height: 40px;
  462. overflow-x: hidden;
  463. overflow-y: auto;
  464. }
  465. .chat-container .left .search_users :hover,.select_item{
  466. font-weight: bold;
  467. }
  468. .chat-container .left .search_users .fastchat_user{
  469. height: 40px;
  470. width: 100%;
  471. padding-left: 6%;
  472. cursor:pointer;
  473. margin-bottom: 10px;
  474. }
  475. .chat-container .left .search_users .fastchat_user img{
  476. height: 40px;
  477. width: 40px;
  478. }
  479. .chat-container .left .search_users .fastchat_user .name{
  480. margin-left: 10px;
  481. }
  482. .chat-container .left .search_users .fastchat_user .go_chat{
  483. float: right;
  484. margin-right: 6%;
  485. color: var(--blue);
  486. font-weight: normal !important;
  487. }
  488. @media screen and (max-width: 766px) {
  489. .chat-container .left {
  490. float: left;
  491. width: 99%;
  492. height: 100%;
  493. border: 1px solid var(--light);
  494. background-color: var(--white);
  495. }
  496. .chat-container .right {
  497. position: relative;
  498. float: left;
  499. display: none;
  500. width: 99%;
  501. height: 100%;
  502. }
  503. }
  504. /*抖动动画-代码来源于:shake.css*/
  505. @keyframes shake-horizontal {
  506. 2% {
  507. transform: translate(-6px, 0) rotate(0); }
  508. 4% {
  509. transform: translate(9px, 0) rotate(0); }
  510. 6% {
  511. transform: translate(-6px, 0) rotate(0); }
  512. 8% {
  513. transform: translate(-2px, 0) rotate(0); }
  514. 10% {
  515. transform: translate(8px, 0) rotate(0); }
  516. 12% {
  517. transform: translate(-6px, 0) rotate(0); }
  518. 14% {
  519. transform: translate(0px, 0) rotate(0); }
  520. 16% {
  521. transform: translate(-1px, 0) rotate(0); }
  522. 18% {
  523. transform: translate(9px, 0) rotate(0); }
  524. 20% {
  525. transform: translate(-4px, 0) rotate(0); }
  526. 22% {
  527. transform: translate(-6px, 0) rotate(0); }
  528. 24% {
  529. transform: translate(-5px, 0) rotate(0); }
  530. 26% {
  531. transform: translate(-9px, 0) rotate(0); }
  532. 28% {
  533. transform: translate(-4px, 0) rotate(0); }
  534. 30% {
  535. transform: translate(2px, 0) rotate(0); }
  536. 32% {
  537. transform: translate(0px, 0) rotate(0); }
  538. 34% {
  539. transform: translate(0px, 0) rotate(0); }
  540. 36% {
  541. transform: translate(1px, 0) rotate(0); }
  542. 38% {
  543. transform: translate(-1px, 0) rotate(0); }
  544. 40% {
  545. transform: translate(0px, 0) rotate(0); }
  546. 42% {
  547. transform: translate(1px, 0) rotate(0); }
  548. 44% {
  549. transform: translate(-8px, 0) rotate(0); }
  550. 46% {
  551. transform: translate(-8px, 0) rotate(0); }
  552. 48% {
  553. transform: translate(8px, 0) rotate(0); }
  554. 50% {
  555. transform: translate(3px, 0) rotate(0); }
  556. 52% {
  557. transform: translate(-4px, 0) rotate(0); }
  558. 54% {
  559. transform: translate(3px, 0) rotate(0); }
  560. 56% {
  561. transform: translate(-8px, 0) rotate(0); }
  562. 58% {
  563. transform: translate(0px, 0) rotate(0); }
  564. 60% {
  565. transform: translate(-9px, 0) rotate(0); }
  566. 62% {
  567. transform: translate(-4px, 0) rotate(0); }
  568. 64% {
  569. transform: translate(2px, 0) rotate(0); }
  570. 66% {
  571. transform: translate(1px, 0) rotate(0); }
  572. 68% {
  573. transform: translate(-7px, 0) rotate(0); }
  574. 70% {
  575. transform: translate(-8px, 0) rotate(0); }
  576. 72% {
  577. transform: translate(5px, 0) rotate(0); }
  578. 74% {
  579. transform: translate(-7px, 0) rotate(0); }
  580. 76% {
  581. transform: translate(6px, 0) rotate(0); }
  582. 78% {
  583. transform: translate(-6px, 0) rotate(0); }
  584. 80% {
  585. transform: translate(4px, 0) rotate(0); }
  586. 82% {
  587. transform: translate(-8px, 0) rotate(0); }
  588. 84% {
  589. transform: translate(-3px, 0) rotate(0); }
  590. 86% {
  591. transform: translate(2px, 0) rotate(0); }
  592. 88% {
  593. transform: translate(-1px, 0) rotate(0); }
  594. 90% {
  595. transform: translate(1px, 0) rotate(0); }
  596. 92% {
  597. transform: translate(-5px, 0) rotate(0); }
  598. 94% {
  599. transform: translate(-8px, 0) rotate(0); }
  600. 96% {
  601. transform: translate(0px, 0) rotate(0); }
  602. 98% {
  603. transform: translate(-8px, 0) rotate(0); }
  604. 0%, 100% {
  605. transform: translate(0, 0) rotate(0); }
  606. }
  607. .fastchat-shake-horizontal {
  608. transform-origin: center center;
  609. animation-name: shake-horizontal;
  610. animation-duration: 100ms;
  611. animation-timing-function: ease-in-out;
  612. animation-iteration-count: 4;
  613. }