Category : css

I’m following this tutorial from W3 Schools https://www.w3schools.com/howto/howto_js_navbar_hide_scroll.asp?fbclid=IwAR2u9aQ9iNBivoIPak1btvH3TSLg2WlThLo0QxcWLdcoLefxh55MGT5FOO0 So good so far, everything is working like it should. But, how can I add a fade effect to this JavaScript code? /* When the user scrolls down, hide the navbar. When the user scrolls up, show the navbar */ var prevScrollpos = window.pageYOffset; window.onscroll = function() ..

Read more

I’m looking for a way to add a class to a div when the page is scrolled to a certain point. The important parts of my CSS: .top-bar { position: fixed; top: 0; width: 100%; height: 6.5vh; } .top-bar-bg { background: -moz-linear-gradient(0deg,#6272e9,#36104a); } I’ve tried adding the class (top-bar-bg) using window.addEventListener("scroll", function(event){ var scroll = ..

Read more

i m working on django where i need to show more than one video in one page . can anyone help me how to stop autostart my videos in iframe. thank you and here is my code. <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" width="1280" height="720" src="/static/assets/img/examples/vi.mp4?&autoPlay=0" frameborder="0" &autoPlay="false"></iframe> </div> Source: Ask Javascript..

Read more