Use this code to add a visual transition effect to your softr landing page. Add to Code Inside Footer.
<style>
section {
opacity: 0;
transform: perspective(1000px) translateX(0px) translateY(30px) scale(1) rotate(0deg) rotateX(10deg) rotateY(0deg) translateZ(0px);
transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
section.visible {
opacity: 1;
transform: perspective(1000px) translateX(0px) translateY(0px) scale(1) rotate(0deg) rotateX(0deg) rotateY(0deg) translateZ(0px);
}
</style>
<script>
window.addEventListener('load', function() {
const observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
} else {
entry.target.classList.remove('visible');
}
});
});
const sections = document.querySelectorAll('section');
sections.forEach(section => observer.observe(section));
});
</script>