style.scss 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. .msg-repeal-item{
  2. padding: 7px 7px 0;
  3. text-align: center;
  4. font-size: 12px;
  5. }
  6. .msg-item {
  7. padding: 0 7px;
  8. margin: 10px 0;
  9. &:hover {
  10. .toolbtn {
  11. display: block;
  12. }
  13. .time {
  14. visibility: visible;
  15. }
  16. }
  17. pre {
  18. text-align: left;
  19. margin: 0;
  20. font-family: inherit;
  21. font-size: inherit;
  22. white-space: pre-wrap;
  23. word-break: normal;
  24. -ms-word-break: break-all;
  25. word-break: break-all;
  26. }
  27. .avatar {
  28. width: 32px;
  29. height: 32px;
  30. margin-top: 4px;
  31. line-height: 32px;
  32. text-align: center;
  33. border-radius: 3px;
  34. cursor: pointer;
  35. &::before {
  36. content: attr(data-name);
  37. color: #ffffff;
  38. font-size: 14px;
  39. }
  40. }
  41. .bubble {
  42. min-height: 1em;
  43. max-width: 100%;
  44. display: inline-block;
  45. vertical-align: top;
  46. position: relative;
  47. text-align: left;
  48. font-size: 14px;
  49. border-radius: 3px;
  50. line-height: 1.6;
  51. padding: 8px 10px;
  52. margin-top: 4px;
  53. &::before {
  54. position: absolute;
  55. width: 0;
  56. height: 0;
  57. top: 14px;
  58. border: 6px solid transparent;
  59. content: "";
  60. }
  61. a {
  62. word-break: break-all;
  63. }
  64. }
  65. .metabar {
  66. position: relative;
  67. }
  68. .time {
  69. float: left;
  70. visibility: hidden;
  71. margin-left: 10px;
  72. font-size: 12px;
  73. line-height: 14px;
  74. color: #bababa;
  75. vertical-align: top;
  76. }
  77. .name {
  78. float: left;
  79. font-size: 12px;
  80. color: #999999;
  81. vertical-align: top;
  82. }
  83. .content {
  84. position: relative;
  85. min-height: 40px;
  86. max-width: 80%;
  87. }
  88. .toolbtn {
  89. position: absolute;
  90. right: -30px;
  91. bottom: 0;
  92. width: 23px;
  93. height: 17px;
  94. background: url("./img/chat-item-icon.png") no-repeat;
  95. display: none;
  96. cursor: pointer;
  97. box-shadow: 1px 1px 50px rgba(212, 180, 180, 0.3);
  98. &:hover {
  99. opacity: 0.6;
  100. }
  101. }
  102. .toolbar {
  103. position: absolute;
  104. background: #ffffff;
  105. border-radius: 5px;
  106. overflow: hidden;
  107. box-shadow: 1px 1px 50px rgba(212, 180, 180, 0.3);
  108. z-index: 11;
  109. width: 60px;
  110. user-select: none;
  111. li {
  112. width: 60px;
  113. line-height: 36px;
  114. text-align: center;
  115. font-size: 14px;
  116. color: #333333;
  117. position: relative;
  118. cursor: pointer;
  119. &.split-line{
  120. &:after {
  121. content: "";
  122. height: 1px;
  123. left: 5px;
  124. right: 5px;
  125. bottom: 0;
  126. position: absolute;
  127. background: #dfdfdf;
  128. }
  129. }
  130. &:hover {
  131. background: #dfdfdf;
  132. }
  133. }
  134. }
  135. }
  136. .you {
  137. .loading-icon{
  138. right: -24px;
  139. }
  140. .error-icon{
  141. right: -24px;
  142. }
  143. .avatar {
  144. float: left;
  145. }
  146. .content {
  147. float: left;
  148. margin-left: 12px;
  149. }
  150. .bubble {
  151. background-color: #ffffff;
  152. &::before {
  153. top: 12px;
  154. border-right-color: #ffffff;
  155. border-right-width: 6px;
  156. right: 100%;
  157. }
  158. &.focus{
  159. background-color: #fafafa;
  160. &::before{
  161. border-right-color: #fafafa;
  162. }
  163. }
  164. }
  165. }
  166. .me {
  167. .loading-icon{
  168. left: -24px;
  169. }
  170. .error-icon{
  171. left: -24px;
  172. }
  173. .avatar {
  174. float: right;
  175. }
  176. .time {
  177. float: right;
  178. margin-right: 10px;
  179. }
  180. .name{
  181. float: right;
  182. }
  183. .link {
  184. color: #005392;
  185. cursor: pointer;
  186. &:hover {
  187. text-decoration: underline;
  188. }
  189. }
  190. .content {
  191. float: right;
  192. margin-right: 12px;
  193. text-align: right;
  194. }
  195. .bubble {
  196. background-color: #83c0ee;
  197. &::before {
  198. top: 6px;
  199. border-left-color: #83c0ee;
  200. border-left-width: 6px;
  201. left: 100%;
  202. }
  203. &.focus{
  204. background-color: #4fa8eb;
  205. &::before{
  206. border-left-color: #4fa8eb;
  207. }
  208. }
  209. }
  210. .toolbtn {
  211. right: initial;
  212. left: -30px;
  213. }
  214. }
  215. .loading-icon{
  216. position: absolute;
  217. background: url('../../assets/msg-loading-icon.png') no-repeat;
  218. background-size: 100%;
  219. width: 20px;
  220. height: 20px;
  221. top: 50%;
  222. margin-top: -10px;
  223. animation: rotate 2s linear infinite;
  224. }
  225. .error-icon{
  226. position: absolute;
  227. background: url('../../assets/msg-error-icon.png') no-repeat;
  228. background-size: 100%;
  229. width: 20px;
  230. height: 20px;
  231. top: 50%;
  232. margin-top: -10px;
  233. cursor: pointer;
  234. }
  235. .img-msg{
  236. display: block;
  237. max-width: 100%;
  238. max-height: 250px;
  239. width: auto;
  240. height: auto;
  241. border-radius: 4px;
  242. cursor: pointer;
  243. }
  244. .video-msg{
  245. display: block;
  246. max-width: 100%;
  247. max-height: 300px;
  248. border-radius: 4px;
  249. &.limit-height{
  250. width: 100%;
  251. height: 50px;
  252. }
  253. }