1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
| .chat_box { display: grid; padding: 15px 10px; margin: 5px 0; transition: background-color 0.5s ease-in-out; }
.left, .weixin, .qq { position: relative; max-width: min(400px, 75%); padding: 8px 10px; margin: 8px 0; border-radius: 5px; word-break: break-all; line-height: 24px; }
.left { justify-self: left; left: 20px; }
.weixin, .qq { justify-self: end; right: 20px; }
.weixin { background-color: #9EEA6A; }
.qq { background-color: #1E6EFF; color: #FFF; }
.left::before, .weixin::before, .qq::before { content: ''; position: absolute; top: 10px; width: 0; height: 0; border-style: solid; }
.left::before { left: -8px; border-width: 8px 10px 8px 0; }
.weixin::before { right: -9px; border-width: 8px 0 8px 10px; }
.qq::before { right: -8px; border-width: 8px 0 8px 10px; }
[data-theme='light'] { .chat_box { background-color: #f5f5f5; }
.left { background-color: #FFF; }
.left::before { border-color: transparent #fff transparent transparent; }
.weixin::before { border-color: transparent transparent transparent #9EEA6A; }
.qq::before { border-color: transparent transparent transparent #1E6EFF; } }
[data-theme='dark'] { .chat_box { background-color: #111111; }
.left, .weixin, .qq { color: #d5d5d5; }
.left { background-color: #2c2c2c; }
.weixin { background-color: #3eb477; color: #111111; }
.qq { background-color: #2c2c2c; }
.left::before { border-color: transparent #2c2c2c transparent transparent; }
.weixin::before { border-color: transparent transparent transparent #3eb477; }
.qq::before { border-color: transparent transparent transparent #2c2c2c; } }
|