chatMini.scss 8.8 KB

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