當我向下滾動時,正文中的圖像顯示在導航欄上方。然而,正文中的文本不受影響。所以我的問題是如何阻止這種情況發生。另一件事是如何使橙色“樣本女王”標題顯示在導航欄下方,因為它現在隱藏在導航欄下方。我希望內容從導航欄下方開始<link rel="stylesheet" ><link rel="stylesheet" type="text/css" href="main.css"><html><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><script>? ? /* When the user scrolls down, hide the navbar. When the user scrolls up, show the navbar */var prevScrollpos = window.pageYOffset;window.onscroll = function() {? var currentScrollPos = window.pageYOffset;? if (prevScrollpos > currentScrollPos) {? ? document.getElementById("navbar").style.top = "0";? } else {? ? document.getElementById("navbar").style.top = "-190px";? }? prevScrollpos = currentScrollPos;}</script><body style="font-family:Century Gothic;"><div id="navbar"? style="background-color:#f1f1f1;padding:15px;text-align: center;">? ? <img src="/Index Files/insta.png" id="border" alt="sample Queen" style="width:100px;height:100px;">? ? <img src="/Index Files/sample.png" id="border" alt="sample Queen" style="width:100px;height:100px;">? ? <img src="/Index Files/asample.png" id="border" alt="sample Queen" style="width:100px;height:100px;">? ? <img src="/Index Files/amazon.jpg" id="border" alt="sample Queen" style="width:100px;height:100px;">? ? <img src="/Index Files/sample.jpg" id="border" alt="sample Queen" style="width:100px;height:100px;">? ? <img src="/Index Files/sampleos.jpg" id="border" alt="sample Queen" style="width:100px;height:100px;"></div>? ??<h1><font color="orange">sample Queen</font></h1><h2>sample Queen is a small soap businets </h2></head>
內容下方的導航欄
慕蓋茨4494581
2023-09-25 16:12:44