CSS
语言:
CSSSCSS
确定
html,
body {
height: 100%;
}
.container {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.rectangle {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
positon: relative;
width: 50px;
height: 50px;
background: #380848;
-webkit-transform: scale(0);
transform: scale(0);
border-radius: 50%;
color: white;
opacity: 0;
overflow: hidden;
-webkit-animation: scale-in .3s ease-out forwards, expand .35s .25s ease-out forwards;
animation: scale-in .3s ease-out forwards, expand .35s .25s ease-out forwards;
}
.notification-text {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 0 16px;
font-family: 'Roboto', sans-serif;
font-size: 14px;
-webkit-animation: fade-in .65s ease-in forwards;
animation: fade-in .65s ease-in forwards;
}
@-webkit-keyframes scale-in {
100% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
@keyframes scale-in {
100% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
@-webkit-keyframes expand {
50% {
width: 350px;
border-radius: 6px;
}
100% {
width: 300px;
border-radius: 4px;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 3px 3px -1px rgba(0, 0, 0, 0.12);
}
}
@keyframes expand {
50% {
width: 350px;
border-radius: 6px;
}
100% {
width: 300px;
border-radius: 4px;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 3px 3px -1px rgba(0, 0, 0, 0.12);
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: .80;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: .80;
}
}