chatRoom.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. @charset "UTF-8";
  2. $chatBg: #34363c;
  3. $chatContBg: #eeeeee;
  4. $chatUiFont: #ffffff;
  5. $offsetBottom: 5px;
  6. $offsetRight: 5px;
  7. @keyframes tipFade{
  8. 0%{
  9. opacity: 1;
  10. transform: scale(1);
  11. }
  12. 100%{
  13. opacity: 0.4;
  14. transform: scale(1.1);
  15. }
  16. }
  17. .group-set-icon{
  18. position: absolute;
  19. right: 0;
  20. top: 0;
  21. height: px2rem(90);
  22. width: px2rem(100);
  23. text-align: center;
  24. font-size: px2rem(42);
  25. line-height: px2rem(90);
  26. color: #333333;
  27. }
  28. .mini-body{
  29. height: 100%;
  30. box-sizing: border-box;
  31. padding: 10px 2px 2px;
  32. background: rgba($color: $chatBg, $alpha: 0.9);
  33. }
  34. .box{
  35. position: relative;
  36. height: 100%;
  37. display: flex;
  38. flex-direction: column;
  39. }
  40. .box-hd{
  41. height: 26px;
  42. position: relative;
  43. .btn-menu{
  44. position: absolute;
  45. cursor: pointer;
  46. left: 0;
  47. top: -2px;
  48. width: 20px;
  49. height: 20px;
  50. background: url("./img/icon-menu.png") center no-repeat;
  51. &.active{
  52. &::before{
  53. display: block;
  54. }
  55. }
  56. &::before{
  57. content: "";
  58. position: absolute;
  59. top: 2px;
  60. right: 0;
  61. width: 6px;
  62. height: 6px;
  63. border-radius: 50%;
  64. background: #ff0000;
  65. display: none;
  66. }
  67. }
  68. .btn-close{
  69. position: absolute;
  70. cursor: pointer;
  71. right: 0;
  72. top: -2px;
  73. width: 20px;
  74. height: 20px;
  75. background: url("./img/icon-close.png") center no-repeat;
  76. &:hover{
  77. background-color: #2a2b30;
  78. }
  79. }
  80. .menu-extra{
  81. position: absolute;
  82. top: 24px;
  83. z-index: 10;
  84. left: 4px;
  85. background: #ffffff;
  86. border-radius: 2px;
  87. box-shadow: 0px 1px 5px 1px #cdcdcd;
  88. .info {
  89. padding: 8px 0;
  90. margin: 0 10px;
  91. .avatar {
  92. float: left;
  93. width: 36px;
  94. height: 36px;
  95. margin-right: 6px;
  96. margin-top: 6px;
  97. border-radius: 4px;
  98. border: 1px solid rgba(0,0,0,0.1);
  99. }
  100. .avatar-bg{
  101. background-color: #f5882b;
  102. text-align: center;
  103. line-height: 32px;
  104. color: #ffffff;
  105. font-size: 14px;
  106. }
  107. .account-info{
  108. float: left;
  109. margin-top: 5px;
  110. line-height: 18px;
  111. }
  112. em {
  113. font-size: 12px;
  114. color: #000000;
  115. }
  116. }
  117. .icon-arrow{
  118. display: inline-block;
  119. vertical-align: middle;
  120. margin-left: 10px;
  121. background: url('../chatMini/img/icon-arrow.png') no-repeat;
  122. width: 8px;
  123. height: 12px;
  124. }
  125. .login-out{
  126. display: block;
  127. line-height: 1.5;
  128. color: #7194c3;
  129. font-size: 12px;
  130. cursor: pointer;
  131. }
  132. li{
  133. line-height: 30px;
  134. font-size: 12px;
  135. padding: 0 10px;
  136. display: block;
  137. &:hover{
  138. background: #dcdddf;
  139. }
  140. em{
  141. display: inline-block;
  142. background: #ff0000;
  143. color: #fff;
  144. font-size: 12px;
  145. padding: 2px 5px;
  146. border-radius: 12px;
  147. z-index: 99;
  148. line-height: 1;
  149. margin-left: 4px;
  150. }
  151. }
  152. a{
  153. color: #333333;
  154. display: block;
  155. text-decoration: none;
  156. border-top: 1px solid #eeeeee;
  157. span{
  158. color: #7194c3;
  159. text-decoration:underline;
  160. }
  161. }
  162. }
  163. .box-title{
  164. min-width: 200px;
  165. text-align: left;
  166. padding-left: 25px;
  167. margin: 0 auto;
  168. font-size: 14px;
  169. color: $chatUiFont;
  170. cursor:pointer;
  171. }
  172. .user-tips{
  173. position: absolute;
  174. top: -2px;
  175. right: 30px;
  176. max-width: 50px;
  177. height: 20px;
  178. line-height: 20px;
  179. font-size: 0;
  180. text-align: right;
  181. cursor: pointer;
  182. padding-left: 20px;
  183. background: url(./img/icon-service.png) 0 center / 13px auto no-repeat;
  184. text-decoration: none;
  185. &.active{
  186. &:before{
  187. display: block;
  188. }
  189. }
  190. &:before{
  191. position: absolute;
  192. top: -6px;
  193. right: -17px;
  194. z-index: 2;
  195. width: 14px;
  196. height: 12px;
  197. background: url(./img/icon-msg-tip.png) 0 center/100% no-repeat;
  198. animation:tipFade .2s infinite alternate;
  199. display: none;
  200. }
  201. em{
  202. vertical-align: middle;
  203. color: $chatUiFont;
  204. font-size: 12px;
  205. }
  206. }
  207. }
  208. .box-bd{
  209. height: 0;
  210. flex: 1;
  211. position: relative;
  212. background: $chatContBg;
  213. .msg-unread{
  214. position: absolute;
  215. width: 120px;
  216. left: 50%;
  217. bottom: 10px;
  218. border-radius: 20px;
  219. background: rgba(#000000, 0.5);
  220. padding: 0 5px;
  221. text-align: center;
  222. line-height: 32px;
  223. margin-left: -65px;
  224. cursor: pointer;
  225. &:hover{
  226. background: rgba(#000000, 0.3);
  227. }
  228. em{
  229. color: #ffffff;
  230. font-size: 14px;
  231. }
  232. i{
  233. transform: rotate(90deg);
  234. margin-right: 5px;
  235. }
  236. }
  237. }
  238. .scroller{
  239. height: 100%;
  240. overflow-x: hidden;
  241. overflow-y: scroll;
  242. -webkit-overflow-scrolling: touch;
  243. &::-webkit-scrollbar {
  244. width: 8px;
  245. height: 6px;
  246. }
  247. &::-webkit-scrollbar-thumb {
  248. border-radius: 3px;
  249. -moz-border-radius: 3px;
  250. -webkit-border-radius: 3px;
  251. background-color: rgba($color: #8d8a8a, $alpha: 0.2);
  252. }
  253. &::-webkit-scrollbar-track {
  254. background-color: transparent;
  255. }
  256. }
  257. .box-ft{
  258. position: relative;
  259. background: $chatContBg;
  260. border-top: 1px solid #d6d6d6;
  261. .input-con{
  262. position: relative;
  263. display: flex;
  264. align-items: flex-end;
  265. background-color: #fafafa;
  266. padding: 6px 0;
  267. }
  268. .input-wrap{
  269. flex: 1;
  270. padding: 10px 0;
  271. background-color: #ffffff;
  272. border-radius: 4px;
  273. }
  274. .more-icon{
  275. width: 38px;
  276. height: 38px;
  277. background: url('../../assets/more-icon.png') center center no-repeat;
  278. background-size: 22px 22px;
  279. cursor: pointer;
  280. &:hover{
  281. opacity: .6;
  282. }
  283. }
  284. .emoji-icon{
  285. width: 38px;
  286. height: 38px;
  287. background: url('../../assets/m-face-icon.png') center center no-repeat;
  288. background-size: 22px 22px;
  289. cursor: pointer;
  290. &:hover{
  291. opacity: .6;
  292. }
  293. }
  294. // .btn-file{
  295. // width: 32px;
  296. // height: 37px;
  297. // background: url("../../assets/icon-file.png") center center no-repeat;
  298. // background-size: 21px 21px;
  299. // position: relative;
  300. // &:hover{
  301. // opacity: 0.7;
  302. // }
  303. // input[type=file] {
  304. // opacity: 0;
  305. // position: absolute;
  306. // top: 0;
  307. // left: 0;
  308. // width: 100%;
  309. // height: 100%;
  310. // cursor: pointer;
  311. // }
  312. // }
  313. // .btn-emoji{
  314. // width: 32px;
  315. // cursor: pointer;
  316. // height: 37px;
  317. // background: url("../../assets/icon-face.png") center center no-repeat;
  318. // background-size: 21px 21px;
  319. // &:hover{
  320. // opacity: 0.7;
  321. // }
  322. // }
  323. // .icon-packet{
  324. // width: 32px;
  325. // cursor: pointer;
  326. // height: 37px;
  327. // background: url("../../assets/icon-packet.png") center center no-repeat;
  328. // background-size: 21px 21px;
  329. // &:hover{
  330. // opacity: 0.7;
  331. // }
  332. // }
  333. .btn-send{
  334. margin-right: 4px;
  335. font-size: 12px;
  336. color: #ffffff;
  337. padding: 0 10px;
  338. height: 28px;
  339. line-height: 28px;
  340. margin-bottom: 3px;
  341. background: #2b9ff6;
  342. border-radius: 3px;
  343. cursor: pointer;
  344. &:hover{
  345. opacity: 0.8;
  346. }
  347. }
  348. form{
  349. @include flex(1);
  350. }
  351. textarea {
  352. display: block;
  353. width: 100%;
  354. height: 18px;
  355. max-height: 175px;
  356. font-size: 14px;
  357. color: #000000;
  358. line-height: 16px;
  359. padding: 1px;
  360. padding-left: 8px;
  361. margin: 0;
  362. border: none;
  363. outline: none;
  364. background: none;
  365. box-sizing: border-box;
  366. resize: none;
  367. }
  368. .emoji-wrap{
  369. // position: absolute;
  370. // left: 0;
  371. // right: 0;
  372. // bottom: 52px;
  373. // background: #ffffff;
  374. // box-shadow: 1px 1px 50px rgba(0,0,0,.3);
  375. // z-index: 10;
  376. }
  377. .input-ctrl{
  378. span{
  379. width: 120px;
  380. margin: 4px auto;
  381. height: 30px;
  382. line-height: 30px;
  383. color: #ffffff;
  384. font-size: 12px;
  385. text-align: center;
  386. display: block;
  387. background-image: -webkit-linear-gradient( 90deg, rgb(25,145,235) 0%, rgb(46,161,248) 100%);
  388. border-radius: 3px;
  389. &.enable{
  390. cursor: pointer;
  391. &:hover{
  392. opacity: 0.7;
  393. }
  394. }
  395. }
  396. }
  397. }
  398. .mini-control{
  399. position: fixed;
  400. right: $offsetBottom;
  401. bottom: $offsetRight;
  402. user-select: none;
  403. .at-tip{
  404. position: absolute;
  405. left: -9px;
  406. top: -9px;
  407. width: 18px;
  408. height: 18px;
  409. background: #e0273a;
  410. border-radius: 50%;
  411. overflow: hidden;
  412. font-size: 12px;
  413. line-height: 18px;
  414. color: #fff;
  415. text-align: center;
  416. }
  417. ul{
  418. @include webkitbox(1);
  419. background: $chatBg;
  420. opacity: .9;
  421. border-radius: 4px;
  422. overflow: hidden;
  423. }
  424. li{
  425. width: 60px;
  426. height: 40px;
  427. line-height: 40px;
  428. text-align: center;
  429. font-size: 0;
  430. cursor: pointer;
  431. &:hover{
  432. background: #42454c;
  433. }
  434. em{
  435. font-size: 12px;
  436. color: $chatUiFont;
  437. vertical-align: middle;
  438. padding-left: 4px;
  439. }
  440. }
  441. .msg-tips{
  442. &:before{
  443. content: "";
  444. background: url("./img/icon-meechat.png") center center no-repeat;
  445. background-size: 100%;
  446. width: 22px;
  447. height: 20px;
  448. display: inline-block;
  449. vertical-align: middle;
  450. }
  451. }
  452. }
  453. .user-tips{
  454. &:before{
  455. content: "";
  456. background: url("./img/icon-user.png") no-repeat;
  457. background-size: 100%;
  458. width: 8px;
  459. height: 9px;
  460. display: inline-block;
  461. vertical-align: middle;
  462. margin-right: 4px;
  463. }
  464. }
  465. .meechat-icon {
  466. width: 46px;
  467. height: 40px;
  468. background: url('./img/meechat-bg.png') center center no-repeat;
  469. background-size: 100%;
  470. text-align: center;
  471. border-radius: 4px;
  472. cursor: pointer;
  473. padding-top: 14px;
  474. box-sizing: border-box;
  475. &:hover{
  476. opacity: .8;
  477. }
  478. em{
  479. color: #ffffff;
  480. font-size: 12px;
  481. }
  482. }
  483. .msg-wrap{
  484. padding-bottom: 16px;
  485. }
  486. .msg-top-more{
  487. margin-top: 10px;
  488. text-align: center;
  489. i{
  490. font-size: 30px;
  491. }
  492. em{
  493. font-size: 12px;
  494. line-height: 20px;
  495. color: #999999;
  496. }
  497. }
  498. .msg-loading-icon{
  499. display: block;
  500. background: url('../../assets/loading-icon.png') no-repeat;
  501. background-size: 100%;
  502. width: 16px;
  503. height: 16px;
  504. margin: 12px auto;
  505. animation: rotate 2s linear infinite;
  506. }
  507. .h5-wrap{
  508. .msg-wrap{
  509. box-sizing: border-box;
  510. height: 100%;
  511. display: flex;
  512. flex-direction: column;
  513. justify-content: flex-end;
  514. overflow: hidden;
  515. }
  516. }