style.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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. }
  93. .metabar {
  94. position: relative;
  95. line-height: 20px;
  96. font-size: 12px;
  97. overflow: hidden;
  98. }
  99. .admin{
  100. font-size: 12px;
  101. color: #999999;
  102. i{
  103. display: inline-block;
  104. vertical-align: top;
  105. }
  106. .el-icon-star-on{
  107. color: #f5ab5c;
  108. font-size: 12px;
  109. }
  110. .icon-creator{
  111. background: url('../../assets/icon-creater.png') no-repeat;
  112. width: 12px;
  113. height: 11px;
  114. background-size: 100%;
  115. }
  116. }
  117. .time {
  118. float: left;
  119. visibility: hidden;
  120. margin-left: 10px;
  121. color: #bababa;
  122. }
  123. .name {
  124. float: left;
  125. color: #999999;
  126. max-width: 200px;
  127. @include ellipsis;
  128. }
  129. .content {
  130. position: relative;
  131. min-height: 40px;
  132. max-width: 80%;
  133. &::selection {
  134. background: #3390ff;
  135. }
  136. }
  137. .toolbtn {
  138. position: absolute;
  139. right: -30px;
  140. bottom: 0;
  141. width: 23px;
  142. height: 17px;
  143. background: url("./img/chat-item-icon.png") no-repeat;
  144. display: none;
  145. cursor: pointer;
  146. box-shadow: 1px 1px 50px rgba(212, 180, 180, 0.3);
  147. &:hover {
  148. opacity: 0.6;
  149. }
  150. }
  151. &.you {
  152. .loading-icon{
  153. right: -24px;
  154. }
  155. .error-icon{
  156. right: -24px;
  157. }
  158. .avatar {
  159. float: left;
  160. }
  161. .content {
  162. float: left;
  163. margin-left: 12px;
  164. }
  165. .admin{
  166. float: left;
  167. margin-left: 4px;
  168. }
  169. .bubble {
  170. background-color: #ffffff;
  171. &::before {
  172. top: 12px;
  173. border-right-color: #ffffff;
  174. border-right-width: 6px;
  175. right: 100%;
  176. }
  177. &.focus{
  178. background-color: #fafafa;
  179. &::before{
  180. border-right-color: #fafafa;
  181. }
  182. }
  183. }
  184. }
  185. &.me {
  186. .admin{
  187. float: right;
  188. margin-right: 4px;
  189. }
  190. .loading-icon{
  191. left: -24px;
  192. }
  193. .error-icon{
  194. left: -24px;
  195. }
  196. .avatar {
  197. float: right;
  198. }
  199. .time {
  200. float: right;
  201. margin-right: 10px;
  202. }
  203. .name{
  204. float: right;
  205. }
  206. .link {
  207. color: #005392;
  208. cursor: pointer;
  209. &:hover {
  210. text-decoration: underline;
  211. }
  212. }
  213. .content {
  214. float: right;
  215. margin-right: 12px;
  216. text-align: right;
  217. }
  218. .bubble {
  219. background-color: #83c0ee;
  220. &::before {
  221. top: 6px;
  222. border-left-color: #83c0ee;
  223. border-left-width: 6px;
  224. left: 100%;
  225. }
  226. &.focus{
  227. background-color: #4fa8eb;
  228. &::before{
  229. border-left-color: #4fa8eb;
  230. }
  231. }
  232. }
  233. .toolbtn {
  234. right: initial;
  235. left: -30px;
  236. }
  237. }
  238. .loading-icon{
  239. position: absolute;
  240. background: url('../../assets/msg-loading-icon.png') no-repeat;
  241. background-size: 100%;
  242. width: 20px;
  243. height: 20px;
  244. top: 50%;
  245. margin-top: -10px;
  246. animation: rotate 2s linear infinite;
  247. }
  248. .error-icon{
  249. position: absolute;
  250. background: url('../../assets/msg-error-icon.png') no-repeat;
  251. background-size: 100%;
  252. width: 20px;
  253. height: 20px;
  254. top: 50%;
  255. margin-top: -10px;
  256. cursor: pointer;
  257. }
  258. .img-msg{
  259. display: block;
  260. max-width: 100%;
  261. max-height: 250px;
  262. width: auto;
  263. height: auto;
  264. border-radius: 4px;
  265. cursor: pointer;
  266. }
  267. .video-msg{
  268. display: block;
  269. max-width: 100%;
  270. max-height: 300px;
  271. border-radius: 4px;
  272. &.limit-height{
  273. width: 100%;
  274. height: 50px;
  275. }
  276. }
  277. }
  278. @keyframes blink{
  279. 0%,50%,100%{
  280. background: rgba(0, 0, 0,0.03)
  281. }
  282. 25%,75%{
  283. background: rgba(0, 0, 0, 0.08)
  284. }
  285. }
  286. @keyframes blinkBorderLeft{
  287. 0%,50%,100%{
  288. border-left-color: rgba(0, 0, 0,0.03);
  289. }
  290. 25%,75%{
  291. border-left-color: rgba(0, 0, 0,0.03);
  292. }
  293. }
  294. @keyframes blinkBorderRight{
  295. 0%,50%,100%{
  296. border-right-color: rgba(0, 0, 0,0.03);
  297. }
  298. 25%,75%{
  299. border-right-color: rgba(0, 0, 0, 0.08);
  300. }
  301. }
  302. .h5-wrap{
  303. .msg-item{
  304. margin: px2rem(18) 0;
  305. .avatar{
  306. width: px2rem(90);
  307. height: px2rem(90);
  308. line-height: px2rem(90);
  309. }
  310. .content{
  311. max-width: 75%
  312. }
  313. .name{
  314. font-size: px2rem(20);
  315. }
  316. }
  317. }