簡體   English   中英

CSS菜單欄移出背景圖像

[英]CSS menu bar moving out of background image

我正在為一個學校項目工作,我們必須制作一個網頁。 由於這是我第一次從事類似的工作,所以我有一個小問題。 問題是當我使屏幕寬度變小時,菜單欄移出背景圖像。 您可以在這里看到它: https : //r0590903.webontwerp.khleuven.be/website/html/

我的html:

 nav { background: url(Images/HeaderDepot.jpg); height: 469px; width: 100%; background-repeat: no-repeat; background-size: 100%; margin-top: -50px; display: inline-block; } ul { list-style: none; padding: 0px; margin: 0px; } ul li { display: block; position: relative; float: left; } li ul { display: none; } ul li a { display: block; padding: 7px; text-decoration: none; white-space: nowrap; color: #000; background-color: #FFF; opacity: 0.75; margin-right: 10px; margin-top: 430px; } 
  <div class="header-container"> <header class="wrapper clearfix"> <nav class="nav"> <a href="HTMLDepot39HomepaginaEN.html" id="taal">EN</a> <a href="index.html" id="taal2">NL</a> <ul class="ul"> <li class="active"><a href="index.html">Home</a></li> <li><a href="HTMLDepot39FormulierNL.html">Reserveren</a></li> <li><a href="HTMLDepot39FotopaginaNL.html">Galerij</a></li> </ul> </nav> </header> </div> 

我知道當您縮小頁面時,我的想法還不正確,但是現在我的主要問題是菜單欄。

有任何解決辦法嗎? 提前致謝!

nav標簽中刪除background-size:100%

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM