preact-css-transition-group
Version:
Apply CSS transitions when adding or removing Preact components/elements.
25 lines (20 loc) • 332 B
CSS
.example-enter {
opacity: 0.01;
transition: opacity 1s ease-in;
}
.example-enter.example-enter-active {
opacity: 1;
}
.example-leave {
opacity: 1;
transition: opacity 1s ease-in;
}
.example-leave.example-leave-active {
opacity: 0.01;
}
.item {
width:100px;
border:1px solid red;
padding:10px;
margin:10px;
}