chatMini.scss 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  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. }
  244. .input-con{
  245. position: relative;
  246. display: flex;
  247. align-items: flex-end;
  248. background-color: #fafafa;
  249. padding: 6px 0;
  250. }
  251. .input-wrap{
  252. flex: 1;
  253. padding: 10px 0;
  254. background-color: #ffffff;
  255. border-radius: 4px;
  256. }
  257. .more-icon{
  258. width: 38px;
  259. height: 38px;
  260. background: url('../../assets/more-icon.png') center center no-repeat;
  261. background-size: 22px 22px;
  262. cursor: pointer;
  263. &:hover{
  264. opacity: .6;
  265. }
  266. }
  267. .emoji-icon{
  268. width: 38px;
  269. height: 38px;
  270. background: url('../../assets/m-face-icon.png') center center no-repeat;
  271. background-size: 22px 22px;
  272. cursor: pointer;
  273. &:hover{
  274. opacity: .6;
  275. }
  276. }
  277. .btn-send{
  278. margin-right: 4px;
  279. font-size: 12px;
  280. color: #ffffff;
  281. padding: 0 10px;
  282. height: 28px;
  283. line-height: 28px;
  284. margin-bottom: 3px;
  285. background: #2b9ff6;
  286. border-radius: 3px;
  287. cursor: pointer;
  288. &:hover{
  289. opacity: 0.8;
  290. }
  291. }
  292. form{
  293. @include flex(1);
  294. }
  295. textarea {
  296. display: block;
  297. width: 100%;
  298. height: 18px;
  299. max-height: 175px;
  300. font-size: 14px;
  301. color: #000000;
  302. line-height: 16px;
  303. padding: 1px;
  304. padding-left: 8px;
  305. margin: 0;
  306. border: none;
  307. outline: none;
  308. background: none;
  309. box-sizing: border-box;
  310. resize: none;
  311. }
  312. .input-ctrl{
  313. span{
  314. width: 120px;
  315. margin: 4px auto;
  316. height: 30px;
  317. line-height: 30px;
  318. color: #ffffff;
  319. font-size: 12px;
  320. text-align: center;
  321. display: block;
  322. background-image: -webkit-linear-gradient( 90deg, rgb(25,145,235) 0%, rgb(46,161,248) 100%);
  323. border-radius: 3px;
  324. &.enable{
  325. cursor: pointer;
  326. &:hover{
  327. opacity: 0.7;
  328. }
  329. }
  330. }
  331. }
  332. }
  333. .scroller{
  334. height: 100%;
  335. overflow-x: hidden;
  336. overflow-y: scroll;
  337. -webkit-overflow-scrolling: touch;
  338. &::-webkit-scrollbar {
  339. width: 8px;
  340. height: 6px;
  341. }
  342. &::-webkit-scrollbar-thumb {
  343. border-radius: 3px;
  344. -moz-border-radius: 3px;
  345. -webkit-border-radius: 3px;
  346. background-color: rgba($color: #8d8a8a, $alpha: 0.2);
  347. }
  348. &::-webkit-scrollbar-track {
  349. background-color: transparent;
  350. }
  351. }
  352. .mini-control{
  353. position: fixed;
  354. right: $offsetBottom;
  355. bottom: $offsetRight;
  356. user-select: none;
  357. .at-tip{
  358. position: absolute;
  359. left: -9px;
  360. top: -9px;
  361. width: 18px;
  362. height: 18px;
  363. background: #e0273a;
  364. border-radius: 50%;
  365. overflow: hidden;
  366. font-size: 12px;
  367. line-height: 18px;
  368. color: #fff;
  369. text-align: center;
  370. }
  371. ul{
  372. @include webkitbox(1);
  373. background: $chatBg;
  374. opacity: .9;
  375. border-radius: 4px;
  376. overflow: hidden;
  377. }
  378. li{
  379. width: 60px;
  380. height: 40px;
  381. line-height: 40px;
  382. text-align: center;
  383. font-size: 0;
  384. cursor: pointer;
  385. &:hover{
  386. background: #42454c;
  387. }
  388. em{
  389. font-size: 12px;
  390. color: $chatUiFont;
  391. vertical-align: middle;
  392. padding-left: 4px;
  393. }
  394. }
  395. .msg-tips{
  396. &:before{
  397. content: "";
  398. background: url("./img/icon-meechat.png") center center no-repeat;
  399. background-size: 100%;
  400. width: 22px;
  401. height: 20px;
  402. display: inline-block;
  403. vertical-align: middle;
  404. }
  405. }
  406. }
  407. .user-tips{
  408. &:before{
  409. content: "";
  410. background: url("./img/icon-user.png") no-repeat;
  411. background-size: 100%;
  412. width: 8px;
  413. height: 9px;
  414. display: inline-block;
  415. vertical-align: middle;
  416. margin-right: 4px;
  417. }
  418. }
  419. .meechat-icon {
  420. background: rgba(52,54,60,0.9);
  421. border-radius: 4px;
  422. padding: 10px 14px;
  423. cursor: pointer;
  424. &:hover{
  425. opacity: .8;
  426. }
  427. em{
  428. color: #ffffff;
  429. font-size: 12px;
  430. margin-left: 8px;
  431. }
  432. .icon-logo{
  433. display: inline-block;
  434. vertical-align: middle;
  435. width: 22px;
  436. height: 20px;
  437. background: url('./img/icon-meechat.png') center/100% no-repeat;
  438. }
  439. }
  440. .msg-wrap{
  441. margin-bottom: 16px;
  442. }
  443. .msg-top-more{
  444. margin-top: 10px;
  445. text-align: center;
  446. i{
  447. font-size: 30px;
  448. }
  449. em{
  450. font-size: 12px;
  451. line-height: 20px;
  452. color: #999999;
  453. }
  454. }
  455. .msg-loading-icon{
  456. display: block;
  457. background: url('../../assets/loading-icon.png') no-repeat;
  458. background-size: 100%;
  459. width: 16px;
  460. height: 16px;
  461. margin: 12px auto;
  462. animation: rotate 2s linear infinite;
  463. }