File size: 3,197 Bytes
e636070 |
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
/* message.css */
/* 聊天消息区域样式 */
.chat-messages {
flex-grow: 1;
overflow-y: auto;
padding: 20px;
background-color: #e8d6c5;
}
.message {
display: flex;
margin-bottom: 20px;
gap: 10px;
}
.message .icon {
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
margin-right: 10px;
flex-shrink: 0;
flex-basis: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.message .icon img {
width: 100%;
height: 100%;
object-fit: cover;
min-width: 40px;
min-height: 40px;
}
.message .content {
flex-grow: 1;
position: relative;
}
.message .header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 5px;
}
.message .username {
color: #000000;
font-weight: bold;
}
.message .timestamp {
color: #604d4c;
font-size: 0.8em;
}
.message .text {
color: #000000;
line-height: 1.5;
}
.message.system {
justify-content: center;
margin: 10px 0;
}
.message.system .content {
background-color: rgba(255, 255, 255, 0.1);
padding: 5px 15px;
border-radius: 15px;
}
.message.system .text {
color: #888;
font-size: 0.9em;
text-align: center;
}
/* 底部输入区域样式 */
.input-area {
background-color: #5f3d30;
padding: 10px;
display: flex;
gap: 10px;
border-top: 1px solid #3d3d3d;
}
.input-area textarea {
flex-grow: 1;
background-color: #290000;
border: 1px solid #3a2626;
color: #e7e7e7;
padding: 10px;
resize: none;
border-radius: 4px;
min-height: 40px;
}
.input-area button {
background: none;
border: none;
color: #e4d5ca;
cursor: pointer;
padding: 0 10px;
}
.input-area button:hover {
color: #e7e7e7;
}
.text-wrapper {
position: relative;
}
.text {
padding: 5px;
border-radius: 4px;
transition: background-color 0.2s;
}
.text.editing {
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid #5f3737;
outline: none;
padding: 4px;
color: #000;
}
.edit-buttons {
display: none;
gap: 8px;
margin-top: 8px;
}
.edit-btn {
padding: 4px 12px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9em;
transition: background-color 0.2s;
}
.save-btn {
background-color: #5f3737;
color: white;
}
.save-btn:hover {
background-color: #7a4747;
}
.cancel-btn {
background-color: #ccc;
color: #333;
}
.cancel-btn:hover {
background-color: #999;
}
/* 确保系统消息不可编辑 */
.message.system .text {
contenteditable: false;
pointer-events: none;
}
.story-message {
background-color: #f5f5f5;
border-left: 4px solid #b44b43;
margin: 10px 0;
padding: 15px;
}
.story-message .text {
white-space: pre-wrap;
line-height: 1.5;
color: #333;
}
/* 添加编辑图标按钮样式 */
.edit-icon {
position: absolute;
bottom: 5px;
right: 5px;
cursor: pointer;
opacity: 0;
transition: opacity 0.2s;
background: none;
border: none;
color: #5f3737;
padding: 5px;
}
.message .content:hover .edit-icon {
opacity: 1;
} |