@fe6/water-pro
Version:
An enterprise-class UI design language and Vue-based implementation
96 lines (82 loc) • 1.73 kB
text/less
@notificationPrefixCls: rc-notification;
.@{notificationPrefixCls} {
position: fixed;
z-index: 1000;
&-notice {
position: relative;
display: block;
width: auto;
margin: 10px 0;
padding: 7px 20px 7px 10px;
line-height: 1.5;
vertical-align: middle;
background: #fff;
border: 0 solid rgba(0, 0, 0, 0);
border-radius: 3px 3px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
&-closable {
padding-right: 20px;
}
&-close {
position: absolute;
top: 3px;
right: 5px;
color: #000;
font-weight: 700;
font-size: 16px;
line-height: 1;
text-decoration: none;
text-shadow: 0 1px 0 #fff;
outline: none;
cursor: pointer;
opacity: 0.2;
filter: alpha(opacity=20);
&-x::after {
content: '×';
}
&:hover {
text-decoration: none;
opacity: 1;
filter: alpha(opacity=100);
}
}
}
.fade-effect() {
animation-duration: 0.3s;
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
animation-fill-mode: both;
}
&-fade-enter {
opacity: 0;
.fade-effect();
animation-play-state: paused;
}
&-fade-leave {
.fade-effect();
animation-play-state: paused;
}
&-fade-enter&-fade-enter-active {
animation-name: rcNotificationFadeIn;
animation-play-state: running;
}
&-fade-leave&-fade-leave-active {
animation-name: rcDialogFadeOut;
animation-play-state: running;
}
@keyframes rcNotificationFadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes rcDialogFadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
}