2017-07-31 12 views
0

私の名前はDanielで、私のポートフォリオのWebサイトで働いています。ハンバーガーメニューをクリックするとオーバーレイが欲しいので、すべてが暗くなり、フォーカスがメニューに表示されます。もう一度メニューをクリックするか、メニュー項目の1つをクリックするか、オーバレイの自己をクリックすると消えてしまいます。 http://20162.hosts.ma-cloud.nl/portfoliowebsite/メニューをクリックするとオーバーレイが発生し、境界線を削除します

はまた、私は携帯電話で私のハンバーガーメニューを開き変なボーダーラインを持っていると私はこれまでのところ私のウェブサイトにそれが

リンクを削除する方法がわからない(私だけのモバイル版用)

<!DOCTYPE html> 
<html lang="en"> 

<head> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <meta charset="UTF-8"> 
    <meta name="author" content="Daniel Gotz"> 
    <title>Daniel Gotz | Porfolio </title> 
    <link href="css/bootstrap.min.css" rel="stylesheet"> 
    <link href="css/styles.css" rel="stylesheet"> 
    <link href="css/scrolling-nav.css" rel="stylesheet"> 
    <link href="dist/hamburgers.css" rel="stylesheet"> 
    <link href="https://fonts.googleapis.com/css?family=Exo+2:600,900|Roboto" rel="stylesheet"> 
</head> 

<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top"> 

    <!-- Navigation --> 
    <section id="intro" class="intro-section"> 
     <nav class="navbar navbar-default" role="navigation"> 
     <div class="navbar-header page-scroll"> 
      <button class="hamburger hamburger--spin navbar-toggle visible-xs" type="button" data-toggle="collapse" data-target=".navbar-ex1-collapse"> <span class=" hamburger-box"> 
    <span class=" hamburger-inner"></span> </span> 
      </button> 
     </div> 
     <div class="collapse navbar-collapse navbar-ex1-collapse"> 
      <ul class="nav navbar-nav right"> 
      <li class="hidden"> 
       <a class="page-scroll" href="#page-top"></a> 
      </li> 
      <li> <a class="page-scroll" href="#intro">Intro</a> </li> 
      <li> <a class="page-scroll" href="#mijnwerk">Mijn werk</a> </li> 
      <li> <a class="page-scroll" href="#overdaniel">Over Daniel</a> </li> 
      <li> <a class="page-scroll" href="#contact">Contact</a> </li> 
      </ul> 
     </div> 
    </nav> 

    <div class="overlay" id="overlay"></div> 


     <div class="title"> 
     <h1> Every mountain top is within reach if you just keep climbing</h1> </div> 

     <div class="berg"> 
    <img src="berg.svg"> 


     </div> 


    </section> 
    <section id="mijnwerk" class="about-section"> </section> 
    <section id="overdaniel" class="services-section"> </section> 
    <section id="contact" class="contact-section"> </section> 
    <!-- jQuery --> 
    <script src="js/jquery.js"></script> 
    <!-- Bootstrap Core JavaScript --> 
    <script src="js/bootstrap.min.js"></script> 
    <!-- Scrolling Nav JavaScript --> 
    <script src="js/jquery.easing.min.js"></script> 
    <script src="js/scrolling-nav.js"></script> 
    <script src="js/hamburgers.js"></script> 
</body> 

</html> 

CSS:

HTML(最新版はまだオンラインではありません)の

.overflow { 
    overflow-x: hidden; 
    position: relative; 
} 

.home { 
    height: 100vh; 
    width: 100vw; 
    background-color: #2ecc71; 
} 

.mijnwerk { 
    height: 100vh; 
    width: 100vw; 
    background-color: #27ae60; 
} 


.navbar-default { 
    background: none; 
    border-color: transparent; 
    z-index: 3; 
} 

.right { 
    float: right; 
    text-align: right; 



} 

.navbar-default .navbar-nav>li>a { 
    font-family: 'Roboto', sans-serif; 
    color: #ecf0f1; 
    font-size: 14px; 



} 

.nav>li>a { 
    padding: 15px 25px; 
    border-style: none; 



} 

.navbar-default .navbar-nav>li>a:focus, 
.navbar-default .navbar-nav>li>a:hover { 
    color: #ecf0f1; 
     border-style: none; 

} 

.navbar-default .navbar-toggle:focus, 
.navbar-default .navbar-toggle:hover { 
    background: none 


} 

.navbar-default .navbar-collapse, 
.navbar-default .navbar-form { 
    border-style: none; 



} 



h1 { 

    font-family: 'Exo 2' , sans-serif; 
    font-weight: 900; 
    font-size: 37px; 
    line-height: 60px; 


} 

.title { 
    font-family: 'Exo 2', sans-serif; 
    text-align: center; 
    width: 350px; 
    position: absolute; 
    top: 45%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
} 

.berg { 
    position: absolute; 
    width: 100%; 
    bottom: 0; 
    margin: 0 0 -2px 0; 

} 

.overlay { 
    position: fixed; 
    top: 0; 
    z-index: 2; 
    display: none; 
    overflow: auto; 
    width: 100%; 
    height: 100%; 
    background: #333; 
} 

body { 
    width: 100%; 
    height: 100%; 
} 

html { 
    width: 100%; 
    height: 100%; 
} 

@media(min-width:767px) { 
    .navbar { 

    } 

    .top-nav-collapse { 
     padding: 0; 
    } 
} 

.intro-section { 
    height: 100%; 
    background: #2ecc71; 
    color: white; 
    text-align: center; 


} 

.about-section { 
    height: 100%; 
    background: #27ae60; 
} 

.services-section { 
    height: 100%; 
    background: #3498db; 
} 

.contact-section { 
    height: 100%; 
    padding-top: 150px; 
    text-align: center; 
    background: #eee; 
} 

JS:

// Look for .hamburger 
    var hamburger = document.querySelector(".hamburger"); 
    // On click 
    hamburger.addEventListener("click", function() { 

    // Toggle class "is-active" 
    hamburger.classList.toggle("is-active"); 
    // Do something else, like open/close menu 
    }); 

私は誰かがこれらの問題に私を助けることを願って! :)

答えて

0

この設定では、背景をメニューに渡すだけで、閉じるボタンは含まれず、枠線が削除されます。

.navbar-collapse navbar-ex1-collapse collapse in { 
     background: rgba(27, 27, 62, 0.5); 
    } 

.navbar-default { 
    background: none; 
    border: none; 
    z-index: 3; 
    } 
+0

これは何もしませんでした –

関連する問題