Answers for ".header { position: fixed; right: 0; left: 0; margin: 0; min-height: 50px; padding: 10px; background-color: transparent; color: #ffffff; transition: all 1s ease; } .header.scrolling { background-color: #ffffff; color: #000000; }"

0

.header { position: fixed; right: 0; left: 0; margin: 0; min-height: 50px; padding: 10px; background-color: transparent; color: #ffffff; transition: all 1s ease; } .header.scrolling { background-color: #ffffff; color: #000000; }

// JS Transparent menu fixed on scroll
$(window).scroll(function () {
  var scroll = $(window).scrollTop();

  if (scroll >= 10) {
    $(".header").addClass("scrolling");
  } else {
    $(".header").removeClass("scrolling");
  }
});
Posted by: Guest on October-27-2021
0

.header { position: fixed; right: 0; left: 0; margin: 0; min-height: 50px; padding: 10px; background-color: transparent; color: #ffffff; transition: all 1s ease; } .header.scrolling { background-color: #ffffff; color: #000000; }

/* css Transparent menu fixed on scroll */
.header {
  position: fixed;
  right: 0;
  left: 0;
  margin: 0;
  min-height: 50px;
  padding: 10px;
  background-color: transparent;
  color: #ffffff;
  transition: all 1s ease;
}

.header.scrolling {
  background-color: #ffffff;
  color: #000000;
}
Posted by: Guest on October-27-2021

Code answers related to ".header { position: fixed; right: 0; left: 0; margin: 0; min-height: 50px; padding: 10px; background-color: transparent; color: #ffffff; transition: all 1s ease; } .header.scrolling { background-color: #ffffff; color: #000000; }"

Code answers related to "Javascript"

Browse Popular Code Answers by Language