chat.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. .chatContainer,.chatContainer div, .chatContainer ul, .chatContainer li, .chatContainer p{
  2. -webkit-box-sizing: border-box;
  3. -moz-box-sizing: border-box;
  4. box-sizing: border-box;
  5. }
  6. /* 设置滚动条的样式 */
  7. ::-webkit-scrollbar {
  8. width:5px;
  9. }
  10. /* 滚动槽 */
  11. ::-webkit-scrollbar-track {
  12. border-radius:10px;
  13. }
  14. /* 滚动条滑块 */
  15. ::-webkit-scrollbar-thumb {
  16. border-radius:10px;
  17. background:#8C85E6;
  18. -webkit-box-shadow:#8C85E6;
  19. }
  20. ::-webkit-scrollbar-thumb:window-inactive {
  21. background: rgba(175, 190, 255, 0.4);
  22. }
  23. /*按钮样式*/
  24. .btn-default-styles {
  25. outline: none;
  26. resize: none;
  27. border: none;
  28. display: inline-block;
  29. padding: 5px 10px;
  30. margin-bottom: 0;
  31. font-size: 14px;
  32. font-weight: 400;
  33. line-height: 1.42857143;
  34. text-align: center;
  35. white-space: nowrap;
  36. vertical-align: middle;
  37. -ms-touch-action: manipulation;
  38. touch-action: manipulation;
  39. cursor: pointer;
  40. -webkit-user-select: none;
  41. -moz-user-select: none;
  42. -ms-user-select: none;
  43. user-select: none;
  44. background-image: none;
  45. background: #bbb;
  46. color: #fff;
  47. border-radius: 4px;
  48. }
  49. .btn-default-styles:focus {
  50. outline: none;
  51. }
  52. .btn-default-styles:hover {
  53. background: #c5c5c5;
  54. animation: anniu 1s infinite;
  55. }
  56. .btn-default-styles:active {
  57. box-shadow: 0 2px 3px rgba(0, 0, 0, .2) inset;
  58. }
  59. .chatContainer{
  60. position: fixed;
  61. bottom: 20px;
  62. right: 20px;
  63. left: 20px;
  64. top: 20px;
  65. }
  66. .chatBtn{
  67. width: 50px;
  68. height: 50px;
  69. background: #01bef0;
  70. color: #fff;
  71. line-height: 50px;
  72. text-align: center;
  73. border-radius: 50%;
  74. box-shadow: 2px 2px 2px #d4d4d4;
  75. cursor: pointer;
  76. position: absolute;
  77. bottom: 0;
  78. right: 0;
  79. overflow: hidden;
  80. }
  81. .chatBtn:hover{
  82. background: #01b3df;
  83. box-shadow: none;
  84. }
  85. .chatBtn>i{
  86. font-size: 25px;
  87. }
  88. .chatBox{
  89. left: 20px;
  90. bottom: 20px;
  91. right: 20px;
  92. background: white;
  93. position: absolute;
  94. top: 20px;
  95. overflow: hidden;
  96. border: solid 1px #d5d5d5;
  97. box-shadow: 1px 1px 2px #c0c0c0;
  98. z-index: 1005;
  99. }
  100. .chatBox-head{
  101. width: 100%;
  102. height: 75px;
  103. background: #01aee0;
  104. position: absolute;
  105. top: 0;
  106. left: 0;
  107. }
  108. .chatBox-head-one{
  109. width: 100%;
  110. height: 75px;
  111. line-height: 75px;
  112. color: #fff;
  113. font-size: 20px;
  114. text-align: center;
  115. position: absolute;
  116. top: 0;
  117. left: 0;
  118. }
  119. .chatBox-head-two{
  120. width: 100%;
  121. height: 75px;
  122. color: #fff;
  123. padding: 10px 10px;
  124. display: none;
  125. position: absolute;
  126. top: 0;
  127. left: 0;
  128. }
  129. .chat-return{
  130. float: left;
  131. width: 55px;
  132. height: 55px;
  133. line-height: 55px;
  134. border-radius: 10px;
  135. cursor: pointer;
  136. text-align: center;
  137. }
  138. .chat-return:hover{
  139. background: #0188b7;
  140. }
  141. .chat-close{
  142. float: right;
  143. width: 55px;
  144. height: 55px;
  145. line-height: 55px;
  146. border-radius: 10px;
  147. cursor: pointer;
  148. text-align: center;
  149. }
  150. .chat-close:hover{
  151. background: #0188b7;
  152. }
  153. .chat-people{
  154. float: left;
  155. }
  156. .chat-people>div{
  157. height: 55px;
  158. display: inline-block;
  159. vertical-align: middle;
  160. line-height: 55px;
  161. margin-left: 5px;
  162. }
  163. .chat-people>div:nth-of-type(1){
  164. width: 50px;
  165. height: 50px;
  166. border-radius: 50%;
  167. background: #eee;
  168. overflow: hidden;
  169. }
  170. .chat-people>div:nth-of-type(1)>img{
  171. width: 50px;
  172. height: 50px;
  173. }
  174. .chat-people>div:nth-of-type(2){
  175. width: 165px;
  176. text-align: left;
  177. height: 55px;
  178. white-space: nowrap;
  179. text-overflow: ellipsis;
  180. overflow: hidden;
  181. }
  182. .chatBox-info{
  183. width: 100%;
  184. height: 495px;
  185. background: #fff;
  186. text-align: left;
  187. position: absolute;
  188. top: 75px;
  189. left: 0;
  190. }
  191. .chatBox-list{
  192. width: 100%;
  193. height: 495px;
  194. overflow-y: scroll;
  195. }
  196. .chat-list-people:hover{
  197. cursor: pointer;
  198. background: #f8f8f8;
  199. }
  200. .chat-list-people>div{
  201. height: 55px;
  202. display: inline-block;
  203. vertical-align: middle;
  204. margin-left: 10px;
  205. }
  206. .chat-list-people>div:nth-of-type(1){
  207. width: 40px;
  208. height: 40px;
  209. border-radius: 50%;
  210. background: #eee;
  211. overflow: hidden;
  212. }
  213. .chat-list-people>div:nth-of-type(1)>img{
  214. width: 40px;
  215. height: 40px;
  216. }
  217. .chat-name{
  218. width: 230px;
  219. }
  220. .chat-name>p{
  221. margin: 0;
  222. overflow: hidden;
  223. white-space: nowrap;
  224. text-overflow: ellipsis;
  225. }
  226. .chat-name>p:nth-of-type(1){
  227. line-height: 55px;
  228. }
  229. .chat-list-people>div.message-num{
  230. display: inline-block;
  231. height: auto;
  232. min-width: 10px;
  233. padding: 3px 5px;
  234. font-size: 12px;
  235. font-weight: 700;
  236. line-height: 1;
  237. text-align: center;
  238. white-space: nowrap;
  239. vertical-align: middle;
  240. border-radius: 10px;
  241. margin-right: 15px;
  242. margin-top: 14px;
  243. color: #fff;
  244. background: #f46266;
  245. float: right;
  246. }
  247. .chat-message-num{
  248. display: inline-block;
  249. height: auto;
  250. min-width: 10px;
  251. padding: 3px 5px;
  252. font-size: 12px;
  253. font-weight: 700;
  254. line-height: 1;
  255. text-align: center;
  256. white-space: nowrap;
  257. vertical-align: middle;
  258. border-radius: 10px;
  259. margin-right: 15px;
  260. margin-top: 14px;
  261. color: #fff;
  262. background: #f46266;
  263. position: absolute;
  264. bottom: 40px;
  265. right: -24px;
  266. }
  267. .chatBox-kuang{
  268. width: 100%;
  269. height: 495px;
  270. }
  271. .chatBox-content{
  272. width: 100%;
  273. }
  274. .chatBox-content-demo{
  275. width: 100%;
  276. overflow-y: scroll;
  277. }
  278. .clearfloat:after{
  279. display:block;
  280. clear:both;
  281. content:"";
  282. visibility:hidden;
  283. height:0
  284. }
  285. .clearfloat{
  286. zoom:1;
  287. margin: 10px 10px;
  288. }
  289. .clearfloat .right{
  290. float: right;
  291. }
  292. .author-name{
  293. text-align: center;
  294. margin: 15px 0 5px 0;
  295. color: #888;
  296. }
  297. .clearfloat .chat-message{
  298. max-width: 252px;
  299. text-align: left;
  300. padding: 8px 12px;
  301. border-radius: 6px;
  302. word-wrap:break-word;
  303. display: inline-block;
  304. position: relative;
  305. }
  306. .clearfloat .left .chat-message{
  307. background: #D9D9D9;
  308. min-height: 36px;
  309. }
  310. .clearfloat .left .chat-message:before{
  311. position: absolute;
  312. content: "";
  313. top: 8px;
  314. left: -6px;
  315. border-top: 10px solid transparent;
  316. border-bottom: 10px solid transparent;
  317. border-right: 10px solid #D9D9D9;
  318. }
  319. .clearfloat .right{
  320. text-align: right;
  321. }
  322. .clearfloat .right .chat-message{
  323. background: #8c85e6;
  324. color: #fff;
  325. text-align: left;
  326. min-height: 36px;
  327. }
  328. .clearfloat .right .chat-message:before{
  329. position: absolute;
  330. content: "";
  331. top: 8px;
  332. right: -6px;
  333. border-top: 10px solid transparent;
  334. border-bottom: 10px solid transparent;
  335. border-left: 10px solid #8c85e6;
  336. }
  337. .clearfloat .chat-avatars{
  338. display: inline-block;
  339. width: 30px;
  340. height: 30px;
  341. border-radius: 50%;
  342. background: #eee;
  343. vertical-align: top;
  344. overflow: hidden;
  345. }
  346. .clearfloat .chat-avatars>img{
  347. width: 30px;
  348. height: 30px;
  349. }
  350. .clearfloat .left .chat-avatars{
  351. margin-right: 10px;
  352. }
  353. .clearfloat .right .chat-avatars{
  354. margin-left: 10px;
  355. }
  356. .chatBox-send{
  357. width: 100%;
  358. padding: 10px 5px;
  359. background: #eee;
  360. border-top: 1px #D0D0D0 solid;
  361. position: absolute;
  362. bottom: 0;
  363. left: 0;
  364. }
  365. .div-textarea{
  366. width: 260px;
  367. min-height: 20px;
  368. max-height: 100px;
  369. _height: 120px;
  370. padding: 3px;
  371. outline: 0;
  372. background: #fff;
  373. font-size: 14px;
  374. line-height: 20px;
  375. word-wrap: break-word;
  376. overflow-x: hidden;
  377. overflow-y: auto;
  378. user-modify: read-write-plaintext-only; /*纯文本*/
  379. -webkit-user-modify: read-write-plaintext-only;
  380. -moz-user-modify: read-write-plaintext-only;
  381. }
  382. .div-textarea:focus{
  383. box-shadow: 0 0 15px rgba(82, 168, 236, 0.6);
  384. }
  385. .chatBox-send>div{
  386. float: left;
  387. }
  388. .chatBox-send>div:nth-of-type(2){
  389. font-size: 0;
  390. }
  391. .chatBox-send>div button{
  392. padding: 1px 5px;
  393. margin-left: 3px;
  394. }
  395. .chatBox-send>div label{
  396. padding: 1px 5px;
  397. margin-left: 3px;
  398. }
  399. #chat-biaoqing{
  400. position: relative;
  401. }
  402. .hidden{
  403. display: none;
  404. }
  405. .biaoqing-photo{
  406. width: 200px;
  407. height: 160px;
  408. background: #ffffff;
  409. position: absolute;
  410. top: -160px;
  411. right: 40px;
  412. text-align: left;
  413. border-radius: 5px;
  414. border: solid 1px #c5c5c5;
  415. display: none;
  416. }
  417. .biaoqing-photo::before{
  418. content: '';
  419. position: absolute;
  420. border-top: solid 7px #c5c5c5;
  421. border-left: solid 9px transparent;
  422. border-right: solid 9px transparent;
  423. bottom: -7px;
  424. right: 36px;
  425. }
  426. .biaoqing-photo::after{
  427. content: '';
  428. position: absolute;
  429. border-top: solid 7px #fff;
  430. border-left: solid 10px transparent;
  431. border-right: solid 10px transparent;
  432. bottom: -5px;
  433. right: 35px;
  434. }
  435. .biaoqing-photo>ul{
  436. margin: 0;
  437. width: 200px;
  438. height: 160px;
  439. padding: 3px 2px;
  440. list-style: none;
  441. }
  442. .biaoqing-photo>ul>li{
  443. float: left;
  444. height: 30px;
  445. margin-left: 2px;
  446. }
  447. .emoji-picker-image{
  448. display: inline-block;
  449. width: 30px;
  450. height: 30px;
  451. background: url(../img/bqxtb01.png) no-repeat;
  452. background-size: 200px auto;
  453. cursor: pointer;
  454. }
  455. .biaoqing-photo>ul>li span.emoji-picker-image:hover{
  456. border: solid 1px #f5f5f5;
  457. }
  458. .chat-message img{
  459. width: 220px;
  460. height:auto;
  461. }
  462. @media all and (max-width: 768px) {
  463. .chatBox{
  464. position: fixed;
  465. top: 0;
  466. left: 0;
  467. width: 100%;
  468. height: 100%;
  469. }
  470. }
  471. @media all and (max-width: 370px){
  472. .chat-name{
  473. width: 185px;
  474. }
  475. .chat-people>div:nth-of-type(2){
  476. width: 120px;
  477. }
  478. .clearfloat .chat-message{
  479. max-width: 240px;
  480. }
  481. }