chatMini.scss 9.8 KB

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