新增ui.create.toast用于弹出文字效果
This commit is contained in:
parent
d5edc2b9b1
commit
5dffc03b14
|
@ -0,0 +1,38 @@
|
|||
.toast-container {
|
||||
position: fixed;
|
||||
top: 15%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
|
||||
.toast {
|
||||
display: none;
|
||||
background-color: rgba(255, 165, 0, 0.7);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
width: max-content;
|
||||
animation: fadeInOut 1500ms ease-in-out forwards;
|
||||
}
|
||||
|
||||
|
||||
@keyframes fadeInOut {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
20% {
|
||||
opacity: 1;
|
||||
}
|
||||
80% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -136,6 +136,11 @@ export class UI {
|
|||
* @type {HTMLDivElement}
|
||||
*/
|
||||
tempnowuxie;
|
||||
/**
|
||||
* @type {HTMLDivElement[]}
|
||||
*/
|
||||
toastQueue = [];
|
||||
|
||||
refresh(node) {
|
||||
void window.getComputedStyle(node, null).getPropertyValue("opacity");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue