antd
Version:
An enterprise-class UI design language and React-based implementation
177 lines (176 loc) • 4.27 kB
CSS
.ant-notification {
position: fixed;
z-index: 1010;
width: 335px;
margin-right: 24px;
}
.ant-notification-notice {
padding: 16px;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
background: #fff;
line-height: 1.5;
position: relative;
margin-bottom: 10px;
overflow: hidden;
}
.ant-notification-notice-message {
font-size: 14px;
color: #404040;
margin-bottom: 4px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
line-height: 20px;
}
.ant-notification-notice-description {
font-size: 12px;
}
.ant-notification-notice-closable .ant-notification-notice-message {
padding-right: 24px;
}
.ant-notification-notice-with-icon .ant-notification-notice-message {
font-size: 14px;
margin-left: 48px;
margin-bottom: 4px;
}
.ant-notification-notice-with-icon .ant-notification-notice-description {
margin-left: 48px;
font-size: 12px;
}
.ant-notification-notice-icon {
position: absolute;
left: 16px;
top: 17px;
font-size: 32px;
line-height: 32px;
}
.ant-notification-notice-icon-success {
color: #87d068;
}
.ant-notification-notice-icon-info {
color: #2db7f5;
}
.ant-notification-notice-icon-warning {
color: #fa0;
}
.ant-notification-notice-icon-error {
color: #f50;
}
.ant-notification-notice-close-x:after {
font-size: 12px;
content: "\e633";
font-family: "anticon";
cursor: pointer;
}
.ant-notification-notice-close {
position: absolute;
right: 16px;
top: 10px;
color: #999;
outline: none;
}
.ant-notification-notice-close:hover {
color: #404040;
}
.ant-notification-notice-btn {
float: right;
margin-top: 16px;
}
.ant-notification .notification-fade-effect {
-webkit-animation-duration: 0.24s;
animation-duration: 0.24s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
}
.ant-notification-fade-enter,
.ant-notification-fade-appear {
opacity: 0;
-webkit-animation-duration: 0.24s;
animation-duration: 0.24s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.ant-notification-fade-leave {
-webkit-animation-duration: 0.24s;
animation-duration: 0.24s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
-webkit-animation-duration: 0.2s;
animation-duration: 0.2s;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.ant-notification-fade-enter.ant-notification-fade-enter-active,
.ant-notification-fade-appear.ant-notification-fade-appear-active {
-webkit-animation-name: NotificationFadeIn;
animation-name: NotificationFadeIn;
-webkit-animation-play-state: running;
animation-play-state: running;
}
.ant-notification-fade-leave.ant-notification-fade-leave-active {
-webkit-animation-name: NotificationFadeOut;
animation-name: NotificationFadeOut;
-webkit-animation-play-state: running;
animation-play-state: running;
}
@-webkit-keyframes NotificationFadeIn {
0% {
opacity: 0;
left: 335px;
}
100% {
left: 0;
opacity: 1;
}
}
@keyframes NotificationFadeIn {
0% {
opacity: 0;
left: 335px;
}
100% {
left: 0;
opacity: 1;
}
}
@-webkit-keyframes NotificationFadeOut {
0% {
opacity: 1;
margin-bottom: 10px;
padding-top: 16px;
padding-bottom: 16px;
max-height: 150px;
}
100% {
opacity: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
max-height: 0;
}
}
@keyframes NotificationFadeOut {
0% {
opacity: 1;
margin-bottom: 10px;
padding-top: 16px;
padding-bottom: 16px;
max-height: 150px;
}
100% {
opacity: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
max-height: 0;
}
}