first commit
This commit is contained in:
128
app/muiAnimations.css
Normal file
128
app/muiAnimations.css
Normal file
@ -0,0 +1,128 @@
|
||||
/* MUI 自定义动画效果 */
|
||||
|
||||
/* 消息淡入动画 */
|
||||
@keyframes messageFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 输入框聚焦动画 */
|
||||
@keyframes inputFocus {
|
||||
from {
|
||||
box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.2);
|
||||
}
|
||||
to {
|
||||
box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
/* 打字指示器动画 */
|
||||
@keyframes typingBounce {
|
||||
0%, 60%, 100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
30% {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
}
|
||||
|
||||
/* 按钮悬停动画 */
|
||||
@keyframes buttonHover {
|
||||
from {
|
||||
transform: scale(1);
|
||||
}
|
||||
to {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
|
||||
/* 侧边栏项目选中动画 */
|
||||
@keyframes sidebarItemSelect {
|
||||
from {
|
||||
background-color: rgba(102, 126, 234, 0.05);
|
||||
border-left: 2px solid transparent;
|
||||
}
|
||||
to {
|
||||
background-color: rgba(102, 126, 234, 0.15);
|
||||
border-left: 4px solid #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
/* 应用动画到MUI组件 */
|
||||
.MuiPaper-root {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* 确保消息动画应用 */
|
||||
.chat-message-enter {
|
||||
animation: messageFadeIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* 输入框聚焦效果 */
|
||||
.MuiOutlinedInput-root.Mui-focused {
|
||||
animation: inputFocus 0.2s ease-out;
|
||||
}
|
||||
|
||||
/* 打字指示器效果 */
|
||||
.typing-indicator span {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background-color: #667eea;
|
||||
margin: 0 2px;
|
||||
animation: typingBounce 1.4s infinite ease-in-out both;
|
||||
}
|
||||
|
||||
.typing-indicator span:nth-child(1) {
|
||||
animation-delay: -0.32s;
|
||||
}
|
||||
|
||||
.typing-indicator span:nth-child(2) {
|
||||
animation-delay: -0.16s;
|
||||
}
|
||||
|
||||
.typing-indicator span:nth-child(3) {
|
||||
animation-delay: 0;
|
||||
}
|
||||
|
||||
/* 按钮悬停效果 */
|
||||
.MuiButton-root:not(:disabled) {
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.MuiButton-root:not(:disabled):hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* 平滑滚动 */
|
||||
.chat-container {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 600px) {
|
||||
.MuiBox-root {
|
||||
transition: padding 0.3s ease;
|
||||
}
|
||||
}
|
||||
|
||||
/* 加载指示器动画 */
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
Reference in New Issue
Block a user