Currently, I am in the process of developing a new website for our web design company. One key task is to hide the mobile navigation text while keeping the background visible, and vice versa.
The current animation achieves this effect by causing the text to overlap when the background slides out.
I am looking for a solution similar to the one shown in this photoshopped image, where the text is "masked" to be hidden as it slides away.
<div class="et_pb_menu__menu custom-menu-active">
<nav class="et-menu-nav">
<ul id="menu-primary-menu" class="et-menu nav">
<li class="et_pb_menu_page_id-home menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-17 current_page_item menu-item-40">
<a href="https://grow-my-business.dreamhosters.com/" aria-current="page">Home</a>
</li>
// more list items...
</ul>
</nav>
.et_pb_menu__menu {
position: fixed;
top: 0; left: 0;
height: 100vh!important;
width: 100vw;
background: linear-gradient(135deg,rgba(254,209,7,0.95) 50.1%,rgba(0,0,0,0) 50%);
background-size: 100px 100px;
background-position: -100px -100px;
background-repeat: no-repeat;
pointer-events: none;
transition: all 1s ease;}
.et_pb_menu__menu.custom-menu-active {
pointer-events: all;
background-position: 0% 0%;
background-size: 400% 300%;}
You can view a test version of the site here:
(Please note that the mobile navigation applies to screen sizes of 980px and below.)