How can I overlay and dim screen, after click on a menu button?
<ul id="gn-menu" class="gn-menu-main">
<li class="gn-trigger">
<a class="gn-icon gn-icon-menu"><span>Menu</span></a>
<nav class="gn-menu-wrapper">
<div class="gn-scroller">
<ul class="gn-menu">
<li class="gn-search-item">
<input placeholder="Search" type="search" class="gn-search">
<a class="gn-icon gn-icon-search"><span>Search</span></a>
</li>
<li>
<a class="gn-icon gn-icon-download">Downloads</a>
<ul class="gn-submenu">
<li><a class="gn-icon gn-icon-illustrator">Vector Illustrations</a></li>
<li><a class="gn-icon gn-icon-photoshop">Photoshop files</a></li>
</ul>
</li>
<li><a class="gn-icon gn-icon-cog">Settings</a></li>
<li><a class="gn-icon gn-icon-help">Help</a></li>
<li>
<a class="gn-icon gn-icon-archive">Archives</a>
<ul class="gn-submenu">
<li><a class="gn-icon gn-icon-article">Articles</a></li>
<li><a class="gn-icon gn-icon-pictures">Images</a></li>
<li><a class="gn-icon gn-icon-videos">Videos</a></li>
</ul>
</li>
</ul>
</div><!-- /gn-scroller -->
</nav>
</li>
<li><a href="http://tympanus.net/codrops">Codrops</a></li>
<li><a class="codrops-icon codrops-icon-prev" href="http://tympanus.net/Development/HeaderEffects/"><span>Previous Demo</span></a></li>
<li><a class="codrops-icon codrops-icon-drop" href="http://tympanus.net/codrops/?p=16030"><span>Back to the Codrops Article</span></a></li>
</ul>
User clicks on here(a button)
Sidebar opens on right( here I wanted to make the entire screen with background-color: rgba(0, 0, 0, .9); except right sidebar)
Any tips or help will be highly appropriated, ui kind of work is very complex in my scenario, i am Java developer, creating my personal site.. i have learnt css & jquery too as beginner.
2
Answers
One way is to use
box-shadow: inset -9999px 0 0 0 rgba(0, 0, 0, 0.25);
on theheader
element.Another way is to change the
background-color
of theheader
element.The last way is to use a huge
div
that covers over the page. Set the menu to have a higherz-index
than the hugediv
.These styles should be applied to the huge
div
:And these styles to the Nexus Menu:
Try loading , utilizing
jQuery