chatMini.scss 9.7 KB

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