L
L
LastGeneral2020-04-16 19:27:34
css
LastGeneral, 2020-04-16 19:27:34

How to make a full screen menu?

<nav class="site-navigation">
  <div class="menu-menu-container">
    <ul id="primary-menu" class="menu">
      <li><a href="">домой</a></li>
      <li><a href="">обо мне</a></li>
      <li><a href="">работы</a></li>
      <li><a href="">контакти</a></li>
    </ul>
  </div>			
  <div class="toggle_menu">menu</div>
</nav>

.menu {
    display: none;
}
.menu-active {
    display: block;
}

jQuery('.toggle_menu').click(function(){
    jQuery('.menu').toggleClass('menu-active');
});


How to make a full screen menu? Which will overlap the content.
Something like this:
5e988746b34bb866967797.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Banan44, 2020-04-16
@LastGeneral

body{
    margin:0;
}
.menu {
    display: none;
}
.menu-active {
    display: block;
    background:black;
    height:100vh;
    width:100vw;
    position: absolute;
    z-index: 1000;
    margin:0;
    opacity:0.8;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question