react-nice-scroll
Version:
A React library to smooth scroll and scroll-based animations.
76 lines (68 loc) • 1.49 kB
CSS
body {
margin: 0 ;
padding: 0 ;
height: 100% ;
width: 100% ;
overflow-y: auto ;
}
#root {
height: 100% ;
}
.ns-container {
height: 100vh;
margin: 0 ;
overflow: hidden ;
}
.ns-fixed-element {
position: fixed ;
will-change: top;
}
.ns-horizontal-section {
overflow-x: hidden ;
width: 100% ;
height: 100% ;
position: relative;
}
.ns-horizontal-section__animation-wrap, .ns-horizontal-section__pin-wrap {
display: flex;
align-items: center;
position: relative ;
height: 100vh ;
}
.ns-horizontal-section__item {
padding: 200px 100px;
width: 50vw;
height: calc(100vh - 400px);
display: flex;
align-items: center;
}
.ns-gelly-element {
display: flex;
will-change: transform ;
}
.ns-parallax-image {
margin: 0;
padding: 0;
overflow: hidden ;
display: block ;
width: 100% ;
position: relative ;
}
.ns-parallax-image__inner {
object-fit: cover ;
will-change: transform ;
position: absolute ;
height: 100% ;
width: 100% ;
top: 0 ;
left: 0 ;
}
.ns-sequence-section {
position: relative;
height: 100vh ;
}
.ns-sequence-section__canvas {
max-width: 100vw ;
max-height: 100vh ;
vertical-align: middle ;
}