style.scss 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. .msg-repeal-item{
  2. // padding: 7px 7px 0;
  3. text-align: center;
  4. font-size: 12px;
  5. line-height: 20px;
  6. color: #b2b2b2;
  7. }
  8. .msg-join-item{
  9. text-align: center;
  10. font-size: 12px;
  11. line-height: 20px;
  12. color: #666;
  13. margin: 6px 0;
  14. span{
  15. padding: 0 7px;
  16. display: inline-block;
  17. background: #d3d3d3;
  18. }
  19. }
  20. .msg-item {
  21. padding: 0 7px;
  22. // margin: 10px 0;
  23. &.show-full{
  24. margin: 20px 0 0;
  25. .avatar {
  26. opacity: 1;
  27. cursor: pointer;
  28. &:hover{
  29. opacity: 0.8;
  30. }
  31. }
  32. .metabar,&.me .bubble::before,&.you .bubble::before{
  33. display: block;
  34. }
  35. }
  36. &.active{
  37. .bubble{
  38. animation: blink 3s ease;
  39. }
  40. }
  41. &.me.active .bubble::before{
  42. animation: blinkBorderLeft 3s ease;
  43. }
  44. &.you.active .bubble::before{
  45. animation: blinkBorderRight 3s ease;
  46. }
  47. &:hover {
  48. .toolbtn {
  49. display: block;
  50. }
  51. .time {
  52. visibility: visible;
  53. }
  54. }
  55. .tg-name{
  56. color: #2ca0f7;
  57. }
  58. pre {
  59. text-align: left;
  60. margin: 0;
  61. font-family: inherit;
  62. font-size: inherit;
  63. white-space: pre-wrap;
  64. word-break: normal;
  65. -ms-word-break: break-all;
  66. word-break: break-all;
  67. }
  68. pre::selection,pre *::selection {
  69. background: #5aaeef;
  70. }
  71. .avatar {
  72. width: 32px;
  73. height: 32px;
  74. margin-top: 4px;
  75. line-height: 32px;
  76. text-align: center;
  77. border-radius: 3px;
  78. opacity: 0;
  79. &:hover{
  80. opacity: 0;
  81. }
  82. &::before {
  83. content: attr(data-name);
  84. color: #ffffff;
  85. font-size: 14px;
  86. }
  87. }
  88. .bubble {
  89. min-height: 1em;
  90. max-width: 100%;
  91. display: inline-block;
  92. vertical-align: top;
  93. position: relative;
  94. text-align: left;
  95. font-size: 14px;
  96. border-radius: 3px;
  97. line-height: 1.6;
  98. padding: 8px 10px;
  99. margin: 2px 0;
  100. &.disabled{
  101. user-select: none;
  102. }
  103. &::before {
  104. position: absolute;
  105. width: 0;
  106. height: 0;
  107. top: 14px;
  108. border: 6px solid transparent;
  109. content: "";
  110. }
  111. a {
  112. word-break: break-all;
  113. }
  114. img[src=""],img:not([src]){
  115. opacity:0;
  116. &+.pic-loading{
  117. position: absolute;
  118. top: 0;
  119. right: 0;
  120. bottom: 0;
  121. left: 0;
  122. z-index: 999;
  123. background: url(../../assets/loading.gif) center/50px no-repeat;
  124. }
  125. }
  126. img{
  127. &+.pic-loading2{
  128. position: absolute;
  129. top: 0;
  130. right: 0;
  131. bottom: 0;
  132. left: 0;
  133. overflow: hidden;
  134. z-index: 999;
  135. border-radius: 4px;
  136. transition: all .3s;
  137. &:before{
  138. content: "";
  139. position: absolute;
  140. width: 100%;
  141. height: 100%;
  142. background-image: linear-gradient(to right, #b3b3b3, #ccc, #f5f5f5, #b3b3b3, #ccc, #f5f5f5,#b3b3b3, #ccc, #f5f5f5);
  143. -webkit-background-size: 200% 100%;
  144. animation: bgp 5s infinite linear;
  145. opacity: 0.2;
  146. font-size: 12px;
  147. }
  148. &.is-error{
  149. &:before{
  150. background: url('../../assets/icon-pic-error.png') center no-repeat;
  151. animation: none;
  152. opacity: 1;
  153. }
  154. }
  155. &.is-hide{
  156. transform: scale(0);
  157. &:before{
  158. opacity: 0;
  159. }
  160. }
  161. }
  162. }
  163. }
  164. .metabar {
  165. position: relative;
  166. line-height: 20px;
  167. font-size: 12px;
  168. overflow: hidden;
  169. display: none;
  170. }
  171. .admin{
  172. font-size: 12px;
  173. color: #999999;
  174. i{
  175. display: inline-block;
  176. vertical-align: top;
  177. }
  178. .el-icon-star-on{
  179. color: #f5ab5c;
  180. font-size: 12px;
  181. }
  182. .icon-creator{
  183. background: url('../../assets/icon-creater.png') no-repeat;
  184. width: 12px;
  185. height: 11px;
  186. background-size: 100%;
  187. }
  188. }
  189. i.icon-tele{
  190. display: inline-block;
  191. background: url('../../assets/icon-msg-tele.png') no-repeat;
  192. width: 14px;
  193. height: 14px;
  194. background-size: 100%;
  195. margin: 0 6px;
  196. }
  197. .time {
  198. position: absolute;
  199. top: 50%;
  200. left: 100%;
  201. transform: translateY(-50%);
  202. font-size: 12px;
  203. visibility: hidden;
  204. margin-left: 10px;
  205. color: #bababa;
  206. }
  207. .name {
  208. color: #999999;
  209. max-width: 200px;
  210. @include ellipsis;
  211. }
  212. .content {
  213. position: relative;
  214. min-height: 40px;
  215. max-width: 80%;
  216. }
  217. .toolbtn {
  218. position: absolute;
  219. right: -30px;
  220. bottom: 0;
  221. width: 23px;
  222. height: 17px;
  223. background: url("./img/chat-item-icon.png") no-repeat;
  224. display: none;
  225. cursor: pointer;
  226. box-shadow: 1px 1px 50px rgba(212, 180, 180, 0.3);
  227. &:hover {
  228. opacity: 0.6;
  229. }
  230. }
  231. &.you {
  232. .loading-icon{
  233. right: -24px;
  234. }
  235. .error-icon{
  236. right: -24px;
  237. }
  238. .avatar {
  239. float: left;
  240. }
  241. .content {
  242. float: left;
  243. margin-left: 12px;
  244. }
  245. .admin{
  246. margin-left: 4px;
  247. }
  248. .bubble {
  249. background-color: #ffffff;
  250. &::before {
  251. display: none;
  252. top: 12px;
  253. border-right-color: #ffffff;
  254. border-right-width: 6px;
  255. right: 100%;
  256. }
  257. &.focus{
  258. background-color: #fafafa;
  259. &::before{
  260. border-right-color: #fafafa;
  261. }
  262. }
  263. }
  264. }
  265. &.me {
  266. .admin{
  267. float: right;
  268. margin-right: 4px;
  269. }
  270. i.icon-tele{
  271. float: right;
  272. }
  273. .loading-icon{
  274. left: -24px;
  275. }
  276. .error-icon{
  277. left: -24px;
  278. }
  279. .avatar {
  280. float: right;
  281. }
  282. .time {
  283. left: auto;
  284. right: 100%;
  285. margin-right: 10px;
  286. }
  287. .name{
  288. float: right;
  289. }
  290. .link {
  291. color: #005392;
  292. cursor: pointer;
  293. &:hover {
  294. text-decoration: underline;
  295. }
  296. }
  297. .content {
  298. float: right;
  299. margin-right: 12px;
  300. text-align: right;
  301. }
  302. .bubble {
  303. background-color: #83c0ee;
  304. &::before {
  305. display: none;
  306. top: 6px;
  307. border-left-color: #83c0ee;
  308. border-left-width: 6px;
  309. left: 100%;
  310. }
  311. &.focus{
  312. background-color: #4fa8eb;
  313. &::before{
  314. border-left-color: #4fa8eb;
  315. }
  316. }
  317. }
  318. .toolbtn {
  319. right: initial;
  320. left: -30px;
  321. }
  322. }
  323. .loading-icon{
  324. position: absolute;
  325. background: url('../../assets/msg-loading-icon.png') no-repeat;
  326. background-size: 100%;
  327. width: 20px;
  328. height: 20px;
  329. top: 50%;
  330. margin-top: -10px;
  331. animation: rotate 2s linear infinite;
  332. }
  333. .error-icon{
  334. position: absolute;
  335. background: url('../../assets/msg-error-icon.png') no-repeat;
  336. background-size: 100%;
  337. width: 20px;
  338. height: 20px;
  339. top: 50%;
  340. margin-top: -10px;
  341. cursor: pointer;
  342. }
  343. .img-msg-wrap{
  344. position: relative;
  345. }
  346. .img-msg{
  347. position: relative;
  348. display: block;
  349. max-width: 100%;
  350. max-height: 250px;
  351. object-fit: cover;
  352. width: auto;
  353. height: auto;
  354. border-radius: 4px;
  355. cursor: pointer;
  356. }
  357. .video-msg{
  358. display: block;
  359. max-width: 100%;
  360. max-height: 300px;
  361. border-radius: 4px;
  362. &.limit-height{
  363. width: 100%;
  364. height: 50px;
  365. }
  366. }
  367. }
  368. @keyframes blink{
  369. 0%,50%,100%{
  370. background: rgba(0, 0, 0,0.03)
  371. }
  372. 25%,75%{
  373. background: rgba(0, 0, 0, 0.08)
  374. }
  375. }
  376. @keyframes blinkBorderLeft{
  377. 0%,50%,100%{
  378. border-left-color: rgba(0, 0, 0,0.03);
  379. }
  380. 25%,75%{
  381. border-left-color: rgba(0, 0, 0,0.03);
  382. }
  383. }
  384. @keyframes blinkBorderRight{
  385. 0%,50%,100%{
  386. border-right-color: rgba(0, 0, 0,0.03);
  387. }
  388. 25%,75%{
  389. border-right-color: rgba(0, 0, 0, 0.08);
  390. }
  391. }
  392. .h5-wrap{
  393. .msg-item{
  394. padding: 0 px2rem(18);
  395. &.show-full{
  396. margin: px2rem(15) 0 0;
  397. .metabar,&.me .bubble::before,&.you .bubble::before{
  398. display: block;
  399. }
  400. }
  401. .avatar{
  402. width: px2rem(90);
  403. height: px2rem(90);
  404. line-height: px2rem(90);
  405. }
  406. .content{
  407. max-width: 75%
  408. }
  409. .name{
  410. font-size: px2rem(20);
  411. }
  412. .msg-time{
  413. padding: 1px px2rem(20);
  414. }
  415. }
  416. }
  417. @-webkit-keyframes bgp {
  418. 0% { background-position: 0 0;}
  419. 100% { background-position: -100% 0;}
  420. }