chat.css 9.9 KB

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