Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
@@ -465,17 +465,17 @@ window.onscroll = function() {scrollFunction()};
|
|
465 |
function scrollFunction() {
|
466 |
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
|
467 |
document.querySelector("header").style.padding = "10px 0"; // Menyusut menjadi setengah
|
468 |
-
document.querySelector("header").style.
|
469 |
document.querySelector("header h1").style.fontSize = "1em"; // Menyusut lebih lanjut
|
470 |
document.querySelector("header h1").style.textAlign = "left"; // Teks berpindah ke kiri
|
471 |
} else {
|
472 |
document.querySelector("header").style.padding = "40px 0";
|
|
|
473 |
document.querySelector("header h1").style.fontSize = "2.5em";
|
474 |
document.querySelector("header h1").style.textAlign = "center";
|
475 |
}
|
476 |
}
|
477 |
|
478 |
-
|
479 |
|
480 |
</script>
|
481 |
</body>
|
|
|
465 |
function scrollFunction() {
|
466 |
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
|
467 |
document.querySelector("header").style.padding = "10px 0"; // Menyusut menjadi setengah
|
468 |
+
document.querySelector("header").style.minHeight = "50px"; // Menetapkan tinggi minimum
|
469 |
document.querySelector("header h1").style.fontSize = "1em"; // Menyusut lebih lanjut
|
470 |
document.querySelector("header h1").style.textAlign = "left"; // Teks berpindah ke kiri
|
471 |
} else {
|
472 |
document.querySelector("header").style.padding = "40px 0";
|
473 |
+
document.querySelector("header").style.minHeight = "0"; // Menghapus tinggi minimum
|
474 |
document.querySelector("header h1").style.fontSize = "2.5em";
|
475 |
document.querySelector("header h1").style.textAlign = "center";
|
476 |
}
|
477 |
}
|
478 |
|
|
|
479 |
|
480 |
</script>
|
481 |
</body>
|