style.scss 6.1 KB

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