fix: Beautify CSS

This commit is contained in:
jackfiled 2023-10-09 13:31:03 +08:00
parent f82c3104b5
commit 70ebd98f14
6 changed files with 57 additions and 31 deletions

View File

@ -26,7 +26,11 @@
} }
</ListItem> </ListItem>
</AntList> </AntList>
<div style="height: 200px; width: 100%; flex: none">
</div> </div>
</div>
<div class="control-zone"> <div class="control-zone">
<div style="padding: 10px 82px 20px"> <div style="padding: 10px 82px 20px">
<div class="input-zone"> <div class="input-zone">
@ -83,5 +87,12 @@
}); });
MessageSending = string.Empty; MessageSending = string.Empty;
_messages.Add(new ChatMessage
{
Left = true,
Sender = "凯瑟琳",
Text = "对不起,做不到。"
});
} }
} }

View File

@ -8,6 +8,8 @@
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
min-height: calc(100vh - 64px); min-height: calc(100vh - 64px);
max-height: calc(100vh - 64px);
padding: 10px;
position: relative; position: relative;
background: linear-gradient(180deg, background: linear-gradient(180deg,
#f5f4f6, #f5f4f6,
@ -17,8 +19,10 @@
.chat-zone { .chat-zone {
min-width: 100%; min-width: 100%;
padding: 20px; display: flex;
flex-direction: column;
position: relative; position: relative;
height: 100%;
overflow-y: auto; overflow-y: auto;
} }
@ -28,19 +32,7 @@
position: absolute; position: absolute;
background-color: #b5bddf; background-color: #b5bddf;
display: block; display: block;
} box-shadow: 3px 0 0 #b5bddf;
.control-zone::before {
content: "";
pointer-events: none;
height: 14px;
min-width: inherit;
top: -14px;
display: block;
position: absolute;
background: linear-gradient(180deg,
rgb(187, 193, 223),
#b5bddf);
} }
.input-zone { .input-zone {

View File

@ -6,7 +6,7 @@
<Space > <Space >
<SpaceItem> <SpaceItem>
<p class="title-text"> <p class="title-text">
自律型可重编程对话机器人 自律型可重编程客服机器人
</p> </p>
</SpaceItem> </SpaceItem>

View File

@ -9,13 +9,13 @@
</SpaceItem> </SpaceItem>
<SpaceItem> <SpaceItem>
<div class="bubble">
<p style="font-size: 1.1rem">
@Message.Text
</p>
<p style="font-size: 0.8rem; color: rgb(128,128,128)"> <p style="font-size: 0.8rem; color: rgb(128,128,128)">
@Message.Sender @Message.Sender
</p> </p>
<div class="bubble-left">
<p class="message-text">
@Message.Text
</p>
</div> </div>
</SpaceItem> </SpaceItem>
</Space> </Space>
@ -24,13 +24,15 @@
{ {
<Space Align="start"> <Space Align="start">
<SpaceItem> <SpaceItem>
<div class="bubble"> <div>
<p style="font-size: 1.1rem; align-self: flex-end"> <p style="font-size: 0.8rem; color: rgb(128, 128, 128); text-align: right;">
@Message.Text
</p>
<p style="font-size: 0.8rem; align-self: flex-end; color: rgb(128, 128, 128)">
@Message.Sender @Message.Sender
</p> </p>
<div class="bubble-right">
<p class="message-text">
@Message.Text
</p>
</div>
</div> </div>
</SpaceItem> </SpaceItem>
@ -50,4 +52,5 @@
Sender = "default", Sender = "default",
Text = "default" Text = "default"
}; };
} }

View File

@ -1,8 +1,24 @@
.bubble { .bubble-left {
background-color: white; background-color: white;
border-radius: 10px; border-radius: 1px 10px 10px 10px;
padding: 5px; padding: 5px;
display: flex;
flex-direction: column;
min-width: 80px; min-width: 80px;
max-width: 300px;
width: fit-content;
justify-content: center;
}
.bubble-right {
background-color: white;
border-radius: 10px 1px 10px 10px;
padding: 5px;
max-width: 300px;
width: fit-content;
justify-content: center;
}
.message-text {
font-size: 1.1rem;
margin: 3px;
word-break: break-word;
} }

View File

@ -26,3 +26,7 @@
.blazor-error-boundary::after { .blazor-error-boundary::after {
content: "An error has occurred." content: "An error has occurred."
} }
body {
overflow: hidden;
}