style.scss 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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. &.active{
  24. .bubble{
  25. animation: blink 3s ease;
  26. }
  27. }
  28. &.me.active .bubble::before{
  29. animation: blinkBorderLeft 3s ease;
  30. }
  31. &.you.active .bubble::before{
  32. animation: blinkBorderRight 3s ease;
  33. }
  34. &:hover {
  35. .toolbtn {
  36. display: block;
  37. }
  38. .time {
  39. visibility: visible;
  40. }
  41. }
  42. pre {
  43. text-align: left;
  44. margin: 0;
  45. font-family: inherit;
  46. font-size: inherit;
  47. white-space: pre-wrap;
  48. word-break: normal;
  49. -ms-word-break: break-all;
  50. word-break: break-all;
  51. }
  52. .avatar {
  53. width: 32px;
  54. height: 32px;
  55. margin-top: 4px;
  56. line-height: 32px;
  57. text-align: center;
  58. border-radius: 3px;
  59. cursor: pointer;
  60. &::before {
  61. content: attr(data-name);
  62. color: #ffffff;
  63. font-size: 14px;
  64. }
  65. }
  66. .bubble {
  67. min-height: 1em;
  68. max-width: 100%;
  69. display: inline-block;
  70. vertical-align: top;
  71. position: relative;
  72. text-align: left;
  73. font-size: 14px;
  74. border-radius: 3px;
  75. line-height: 1.6;
  76. padding: 8px 10px;
  77. margin-top: 4px;
  78. &.disabled{
  79. user-select: none;
  80. }
  81. &::before {
  82. position: absolute;
  83. width: 0;
  84. height: 0;
  85. top: 14px;
  86. border: 6px solid transparent;
  87. content: "";
  88. }
  89. a {
  90. word-break: break-all;
  91. }
  92. img[src=""],img:not([src]){
  93. opacity:0;
  94. &+.pic-loading{
  95. position: absolute;
  96. top: 0;
  97. right: 0;
  98. bottom: 0;
  99. left: 0;
  100. z-index: 999;
  101. background: url(../../assets/loading.gif) center/50px no-repeat;
  102. }
  103. }
  104. }
  105. .metabar {
  106. position: relative;
  107. line-height: 20px;
  108. font-size: 12px;
  109. overflow: hidden;
  110. }
  111. .admin{
  112. font-size: 12px;
  113. color: #999999;
  114. i{
  115. display: inline-block;
  116. vertical-align: top;
  117. }
  118. .el-icon-star-on{
  119. color: #f5ab5c;
  120. font-size: 12px;
  121. }
  122. .icon-creator{
  123. background: url('../../assets/icon-creater.png') no-repeat;
  124. width: 12px;
  125. height: 11px;
  126. background-size: 100%;
  127. }
  128. }
  129. i.icon-tele{
  130. display: inline-block;
  131. background: url('../../assets/icon-msg-tele.png') no-repeat;
  132. width: 14px;
  133. height: 14px;
  134. background-size: 100%;
  135. margin: 0 6px;
  136. }
  137. .time {
  138. visibility: hidden;
  139. margin-left: 10px;
  140. color: #bababa;
  141. }
  142. .name {
  143. color: #999999;
  144. max-width: 200px;
  145. @include ellipsis;
  146. }
  147. .content {
  148. position: relative;
  149. min-height: 40px;
  150. max-width: 80%;
  151. &::selection {
  152. background: #3390ff;
  153. }
  154. }
  155. .toolbtn {
  156. position: absolute;
  157. right: -30px;
  158. bottom: 0;
  159. width: 23px;
  160. height: 17px;
  161. background: url("./img/chat-item-icon.png") no-repeat;
  162. display: none;
  163. cursor: pointer;
  164. box-shadow: 1px 1px 50px rgba(212, 180, 180, 0.3);
  165. &:hover {
  166. opacity: 0.6;
  167. }
  168. }
  169. &.you {
  170. .loading-icon{
  171. right: -24px;
  172. }
  173. .error-icon{
  174. right: -24px;
  175. }
  176. .avatar {
  177. float: left;
  178. }
  179. .content {
  180. float: left;
  181. margin-left: 12px;
  182. }
  183. .admin{
  184. float: left;
  185. margin-left: 4px;
  186. }
  187. .bubble {
  188. background-color: #ffffff;
  189. &::before {
  190. top: 12px;
  191. border-right-color: #ffffff;
  192. border-right-width: 6px;
  193. right: 100%;
  194. }
  195. &.focus{
  196. background-color: #fafafa;
  197. &::before{
  198. border-right-color: #fafafa;
  199. }
  200. }
  201. }
  202. }
  203. &.me {
  204. .admin{
  205. float: right;
  206. margin-right: 4px;
  207. }
  208. i.icon-tele{
  209. float: right;
  210. }
  211. .loading-icon{
  212. left: -24px;
  213. }
  214. .error-icon{
  215. left: -24px;
  216. }
  217. .avatar {
  218. float: right;
  219. }
  220. .time {
  221. float: right;
  222. margin-right: 10px;
  223. }
  224. .name{
  225. float: right;
  226. }
  227. .link {
  228. color: #005392;
  229. cursor: pointer;
  230. &:hover {
  231. text-decoration: underline;
  232. }
  233. }
  234. .content {
  235. float: right;
  236. margin-right: 12px;
  237. text-align: right;
  238. }
  239. .bubble {
  240. background-color: #83c0ee;
  241. &::before {
  242. top: 6px;
  243. border-left-color: #83c0ee;
  244. border-left-width: 6px;
  245. left: 100%;
  246. }
  247. &.focus{
  248. background-color: #4fa8eb;
  249. &::before{
  250. border-left-color: #4fa8eb;
  251. }
  252. }
  253. }
  254. .toolbtn {
  255. right: initial;
  256. left: -30px;
  257. }
  258. }
  259. .loading-icon{
  260. position: absolute;
  261. background: url('../../assets/msg-loading-icon.png') no-repeat;
  262. background-size: 100%;
  263. width: 20px;
  264. height: 20px;
  265. top: 50%;
  266. margin-top: -10px;
  267. animation: rotate 2s linear infinite;
  268. }
  269. .error-icon{
  270. position: absolute;
  271. background: url('../../assets/msg-error-icon.png') no-repeat;
  272. background-size: 100%;
  273. width: 20px;
  274. height: 20px;
  275. top: 50%;
  276. margin-top: -10px;
  277. cursor: pointer;
  278. }
  279. .img-msg{
  280. display: block;
  281. max-width: 100%;
  282. max-height: 250px;
  283. object-fit: cover;
  284. width: auto;
  285. height: auto;
  286. border-radius: 4px;
  287. cursor: pointer;
  288. }
  289. .video-msg{
  290. display: block;
  291. max-width: 100%;
  292. max-height: 300px;
  293. border-radius: 4px;
  294. &.limit-height{
  295. width: 100%;
  296. height: 50px;
  297. }
  298. }
  299. }
  300. @keyframes blink{
  301. 0%,50%,100%{
  302. background: rgba(0, 0, 0,0.03)
  303. }
  304. 25%,75%{
  305. background: rgba(0, 0, 0, 0.08)
  306. }
  307. }
  308. @keyframes blinkBorderLeft{
  309. 0%,50%,100%{
  310. border-left-color: rgba(0, 0, 0,0.03);
  311. }
  312. 25%,75%{
  313. border-left-color: rgba(0, 0, 0,0.03);
  314. }
  315. }
  316. @keyframes blinkBorderRight{
  317. 0%,50%,100%{
  318. border-right-color: rgba(0, 0, 0,0.03);
  319. }
  320. 25%,75%{
  321. border-right-color: rgba(0, 0, 0, 0.08);
  322. }
  323. }
  324. .h5-wrap{
  325. .msg-item{
  326. margin: px2rem(18) 0;
  327. .avatar{
  328. width: px2rem(90);
  329. height: px2rem(90);
  330. line-height: px2rem(90);
  331. }
  332. .content{
  333. max-width: 75%
  334. }
  335. .name{
  336. font-size: px2rem(20);
  337. }
  338. }
  339. }