, , DIV, . html, css , GIF. , , , , , transform: translate() CSS . CSS top, .
, , HTML:
<body>
<div>
... Main content ...
</div>
<div id="overlay">
... Overlay content here ...
</div>
</body>
CSS:
#overlay {
position: absolute;
top: 25px;
left: 50px;
width: 1180px;
height: 670px;
transition: all 1s;
transform: rotate(-2deg) translateY(750px);
}
#overlay.active {
transform: rotate(-2deg) translateY(0);
}
That being said, everything I do in my javascript turns the class on and off activeto make the overlay show and hide. I can’t get the timeline debugger to work with remote chrome, so I don’t know exactly what FPS is, but it objectively feels at least 30 frames per second. It definitely seems smooth. Hope this helps.
source
share