notification-component
Version:
Notification component
107 lines (86 loc) • 1.56 kB
CSS
#notifications {
position: fixed;
top: 10px;
right: 15px;
}
#notifications li {
margin-bottom: 5px;
list-style: none;
}
.notification {
position: relative;
max-width: 600px;
min-width: 250px;
border: 1px solid #eee;
background: white;
z-index: 100;
}
.notification .content {
padding: 15px 20px;
}
.notification .title {
margin: 0 0 5px 0;
font-size: 16px;
font-weight: normal;
}
.notification p {
margin: 0;
padding: 0;
font-size: .9em;
}
.notification .close {
position: absolute;
top: 5px;
right: 10px;
text-decoration: none;
color: #888;
display: none;
}
.notification.closable .close {
display: block;
}
.notification .close:hover {
color: black;
}
.notification .close:active {
margin-top: 1px;
}
/* close */
.notification .close {
position: absolute;
top: 3px;
right: 10px;
text-decoration: none;
color: #888;
font-size: 16px;
font-weight: bold;
display: none;
}
/* slide */
.notification.slide {
-webkit-transition: opacity 300ms, top 300ms;
-moz-transition: opacity 300ms, top 300ms;
}
.notification.slide.hide {
opacity: 0;
top: -500px;
}
/* fade */
.notification.fade {
-webkit-transition: opacity 300ms;
-moz-transition: opacity 300ms;
}
.notification.fade.hide {
opacity: 0;
}
/* scale */
.notification.scale {
-webkit-transition: -webkit-transform 300ms;
-moz-transition: -moz-transform 300ms;
-webkit-transform: scale(1);
-moz-transform: scale(1);
}
.notification.scale.hide {
-webkit-transform: scale(0);
-moz-transform: scale(0);
}