.msg-repeal-item{ // padding: 7px 7px 0; text-align: center; font-size: 12px; line-height: 20px; color: #b2b2b2; } .msg-join-item{ text-align: center; font-size: 12px; line-height: 20px; color: #666; margin: 6px 0; span{ padding: 0 7px; display: inline-block; background: #d3d3d3; } } .msg-item { padding: 0 7px; // margin: 10px 0; &.show-full{ margin: 20px 0 0; .avatar { opacity: 1; cursor: pointer; &:hover{ opacity: 0.8; } } .metabar,&.me .bubble::before,&.you .bubble::before{ display: block; } } &.active{ .bubble{ animation: blink 3s ease; } } &.me.active .bubble::before{ animation: blinkBorderLeft 3s ease; } &.you.active .bubble::before{ animation: blinkBorderRight 3s ease; } &:hover { .toolbtn { display: block; } .time { visibility: visible; } } .tg-name{ color: #2ca0f7; } pre { text-align: left; margin: 0; font-family: inherit; font-size: inherit; white-space: pre-wrap; word-break: normal; -ms-word-break: break-all; word-break: break-all; } pre::selection,pre *::selection { background: #5aaeef; } .avatar { width: 32px; height: 32px; margin-top: 4px; line-height: 32px; text-align: center; border-radius: 3px; opacity: 0; &:hover{ opacity: 0; } &::before { content: attr(data-name); color: #ffffff; font-size: 14px; } } .bubble { min-height: 1em; max-width: 100%; display: inline-block; vertical-align: top; position: relative; text-align: left; font-size: 14px; border-radius: 3px; line-height: 1.6; padding: 8px 10px; margin: 2px 0; &.disabled{ user-select: none; } &::before { position: absolute; width: 0; height: 0; top: 14px; border: 6px solid transparent; content: ""; } a { word-break: break-all; } img[src=""],img:not([src]){ opacity:0; &+.pic-loading{ position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 999; background: url(../../assets/loading.gif) center/50px no-repeat; } } img{ &+.pic-loading2{ position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; z-index: 999; border-radius: 4px; transition: all .3s; &:before{ content: ""; position: absolute; width: 100%; height: 100%; background-image: linear-gradient(to right, #b3b3b3, #ccc, #f5f5f5, #b3b3b3, #ccc, #f5f5f5,#b3b3b3, #ccc, #f5f5f5); -webkit-background-size: 200% 100%; animation: bgp 5s infinite linear; opacity: 0.2; font-size: 12px; } &.is-error{ &:before{ background: url('../../assets/icon-pic-error.png') center no-repeat; animation: none; opacity: 1; } } &.is-hide{ transform: scale(0); &:before{ opacity: 0; } } } } } .metabar { position: relative; line-height: 20px; font-size: 12px; overflow: hidden; display: none; } .admin{ font-size: 12px; color: #999999; i{ display: inline-block; vertical-align: top; } .el-icon-star-on{ color: #f5ab5c; font-size: 12px; } .icon-creator{ background: url('../../assets/icon-creater.png') no-repeat; width: 12px; height: 11px; background-size: 100%; } } i.icon-tele{ display: inline-block; background: url('../../assets/icon-msg-tele.png') no-repeat; width: 14px; height: 14px; background-size: 100%; margin: 0 6px; } .time { position: absolute; top: 50%; left: 100%; transform: translateY(-50%); font-size: 12px; visibility: hidden; margin-left: 10px; color: #bababa; } .name { color: #999999; max-width: 200px; @include ellipsis; } .content { position: relative; min-height: 40px; max-width: 80%; } .toolbtn { position: absolute; right: -30px; bottom: 0; width: 23px; height: 17px; background: url("./img/chat-item-icon.png") no-repeat; display: none; cursor: pointer; box-shadow: 1px 1px 50px rgba(212, 180, 180, 0.3); &:hover { opacity: 0.6; } } &.you { .loading-icon{ right: -24px; } .error-icon{ right: -24px; } .avatar { float: left; } .content { float: left; margin-left: 12px; } .admin{ margin-left: 4px; } .bubble { background-color: #ffffff; &::before { display: none; top: 12px; border-right-color: #ffffff; border-right-width: 6px; right: 100%; } &.focus{ background-color: #fafafa; &::before{ border-right-color: #fafafa; } } } } &.me { .admin{ float: right; margin-right: 4px; } i.icon-tele{ float: right; } .loading-icon{ left: -24px; } .error-icon{ left: -24px; } .avatar { float: right; } .time { left: auto; right: 100%; margin-right: 10px; } .name{ float: right; } .link { color: #005392; cursor: pointer; &:hover { text-decoration: underline; } } .content { float: right; margin-right: 12px; text-align: right; } .bubble { background-color: #83c0ee; &::before { display: none; top: 6px; border-left-color: #83c0ee; border-left-width: 6px; left: 100%; } &.focus{ background-color: #4fa8eb; &::before{ border-left-color: #4fa8eb; } } } .toolbtn { right: initial; left: -30px; } } .loading-icon{ position: absolute; background: url('../../assets/msg-loading-icon.png') no-repeat; background-size: 100%; width: 20px; height: 20px; top: 50%; margin-top: -10px; animation: rotate 2s linear infinite; } .error-icon{ position: absolute; background: url('../../assets/msg-error-icon.png') no-repeat; background-size: 100%; width: 20px; height: 20px; top: 50%; margin-top: -10px; cursor: pointer; } .img-msg-wrap{ position: relative; } .img-msg{ position: relative; display: block; max-width: 100%; max-height: 250px; object-fit: cover; width: auto; height: auto; border-radius: 4px; cursor: pointer; } .video-msg{ display: block; max-width: 100%; max-height: 300px; border-radius: 4px; &.limit-height{ width: 100%; height: 50px; } } } @keyframes blink{ 0%,50%,100%{ background: rgba(0, 0, 0,0.03) } 25%,75%{ background: rgba(0, 0, 0, 0.08) } } @keyframes blinkBorderLeft{ 0%,50%,100%{ border-left-color: rgba(0, 0, 0,0.03); } 25%,75%{ border-left-color: rgba(0, 0, 0,0.03); } } @keyframes blinkBorderRight{ 0%,50%,100%{ border-right-color: rgba(0, 0, 0,0.03); } 25%,75%{ border-right-color: rgba(0, 0, 0, 0.08); } } .h5-wrap{ .msg-item{ padding: 0 px2rem(18); &.show-full{ margin: px2rem(15) 0 0; .metabar,&.me .bubble::before,&.you .bubble::before{ display: block; } } .avatar{ width: px2rem(90); height: px2rem(90); line-height: px2rem(90); } .content{ max-width: 75% } .name{ font-size: px2rem(20); } .msg-time{ padding: 1px px2rem(20); } } } @-webkit-keyframes bgp { 0% { background-position: 0 0;} 100% { background-position: -100% 0;} }