100-project-100-days-website/100_projects/58-cloud-translate-banner-js/main.js
2023-04-20 03:20:26 +03:00
Ask

6 lines
176 B
JavaScript

{6892bed593f91c6a29583f762d05408c2bd057c3 true 176 main.js 0xc001f4db20}

let text = document.getElementById('text');
window.addEventListener('scroll', function(){
let value = window.scrollY;
text.style.marginBottom = value * 2 + '2px';
});