chatMini.scss 10 KB

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