Multi Column Fancy Navigation

HTML
<div class="upper fade-out"> <div onclick="movePanels('block-one')" class="upper-container column-one"> <div class="overlay"><h2>Title One</h2></div> </div> <div onclick="movePanels('block-two')" class="upper-container column-two"> <div class="overlay"><h2>Title Two</h2></div> </div> <div onclick="movePanels('block-three')" class="upper-container column-three"> <div class="overlay"><h2>Title Three</h2></div> </div> <div onclick="movePanels('block-four')" class="upper-container column-four"> <div class="overlay"><h2>Title Four</h2></div> </div> </div> <div id="block-one" class="lower"> <div class="top-image" style="background-image: url(https://images.unsplash.com/photo-1626187777040-ffb7cb2c5450?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80)"> <div class="overlay"> <div> <h2>Title One</h2> <div class="fancy-div"></div> <div class="summary">My fellow Earthicans, as I have explained in my book 'Earth in the Balance'', and the much more popular ''Harry Potter and the Balance of Earth', we need to defend our planet against pollution. Also dark wizards. Oh sure! Blame the wizards!</div> <div class="bottom-arrow"> <svg onclick="scrollUp('block-one-copy')" x="0px" y="0px" viewBox="0 0 44 19.4" style="enable-background:new 0 0 44 19.4;" xml:space="preserve"> <polygon points="22,17.4 4.6,3.3 5.9,1.7 22,14.8 38.1,1.7 39.4,3.3 "/> </svg> </div> </div> </div> </div> <div id="block-one-copy" class="lower-copy"> <div class="main-container"> <div class="flex-container"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> <div class="flex-container flex-reverse"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> </div> </div> </div> <div id="block-two" class="lower show"> <div class="top-image" style="background-image: url(https://images.unsplash.com/photo-1497366811353-6870744d04b2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1469&q=80)"> <div class="overlay"> <div> <h2>Title Two</h2> <div class="fancy-div"></div> <div class="summary">My fellow Earthicans, as I have explained in my book 'Earth in the Balance'', and the much more popular ''Harry Potter and the Balance of Earth', we need to defend our planet against pollution. Also dark wizards. Oh sure! Blame the wizards!</div> <div class="bottom-arrow"> <svg onclick="scrollUp('block-two-copy')" x="0px" y="0px" viewBox="0 0 44 19.4" style="enable-background:new 0 0 44 19.4;" xml:space="preserve"> <polygon points="22,17.4 4.6,3.3 5.9,1.7 22,14.8 38.1,1.7 39.4,3.3 "/> </svg> </div> </div> </div> </div> <div id="block-two-copy" class="lower-copy"> <div class="main-container"> <div class="flex-container"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> <div class="flex-container flex-reverse"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> </div> </div> </div> <div id="block-three" class="lower"> <div class="top-image" style="background-image: url(https://images.unsplash.com/photo-1623177623442-979c1e42c255?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTN8fG1vZGVybiUyMG9mZmljZXxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=500&q=60)"> <div class="overlay"> <div> <h2>Title Three</h2> <div class="fancy-div"></div> <div class="summary">My fellow Earthicans, as I have explained in my book 'Earth in the Balance'', and the much more popular ''Harry Potter and the Balance of Earth', we need to defend our planet against pollution. Also dark wizards. Oh sure! Blame the wizards!</div> <div class="bottom-arrow"> <svg onclick="scrollUp('block-three-copy')" x="0px" y="0px" viewBox="0 0 44 19.4" style="enable-background:new 0 0 44 19.4;" xml:space="preserve"> <polygon points="22,17.4 4.6,3.3 5.9,1.7 22,14.8 38.1,1.7 39.4,3.3 "/> </svg> </div> </div> </div> </div> <div id="block-three-copy" class="lower-copy"> <div class="main-container"> <div class="flex-container"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> <div class="flex-container flex-reverse"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> </div> </div> </div> <div id="block-four" class="lower"> <div class="top-image" style="background-image: url(https://images.unsplash.com/photo-1610960245237-cfab0dea6be4?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=764&q=80);"> <div class="overlay"> <div> <h2>Title Four</h2> <div class="fancy-div"></div> <div class="summary">My fellow Earthicans, as I have explained in my book 'Earth in the Balance'', and the much more popular ''Harry Potter and the Balance of Earth', we need to defend our planet against pollution. Also dark wizards. Oh sure! Blame the wizards!</div> <div class="bottom-arrow"> <svg onclick="scrollUp('block-four-copy')" x="0px" y="0px" viewBox="0 0 44 19.4" style="enable-background:new 0 0 44 19.4;" xml:space="preserve"> <polygon points="22,17.4 4.6,3.3 5.9,1.7 22,14.8 38.1,1.7 39.4,3.3 "/> </svg> </div> </div> </div> </div> <div id="block-four-copy" class="lower-copy"> <div class="main-container"> <div class="flex-container"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> <div class="flex-container flex-reverse"> <div class="flex-column"> <p><img src="https://s3.amazonaws.com/imglibs/fiat.jpeg"></p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> <div class="flex-column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc semper augue nunc, vitae gravida tellus posuere ultricies. In suscipit magna id quam malesuada convallis. Maecenas et augue maximus, facilisis leo sed, ultrices tortor. Praesent varius eleifend porta. Nulla eget lorem id lectus placerat luctus. Curabitur ultricies turpis velit, imperdiet ultricies augue ullamcorper varius. Vivamus malesuada rutrum fermentum. Pellentesque tincidunt sapien cursus ante efficitur, vitae tincidunt ante sodales. Duis odio est, congue at nibh et, commodo efficitur massa. Morbi porttitor elit ac sem rhoncus ornare. Curabitur commodo aliquam auctor.</p> <p>Donec erat leo, maximus vitae sodales vitae, egestas et orci. Sed scelerisque aliquam mi, et imperdiet quam scelerisque sed. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sodales, nisl eget dictum consectetur, augue diam sodales leo, at mollis augue ipsum et tortor. Mauris scelerisque augue id mi congue, eu vestibulum tortor vestibulum. Maecenas lobortis feugiat velit, et dignissim leo suscipit ac. Nam iaculis vitae arcu quis facilisis. Donec at urna odio. Maecenas id orci sit amet ipsum tempor lacinia. Vestibulum semper luctus nibh ac rutrum. Etiam convallis dolor et justo congue, eu consectetur lectus ultrices. Nullam eu massa hendrerit, tristique nunc et, vestibulum dolor.</p> </div> </div> </div> </div> </div> <div class="menu-button" onclick="showPanels();"> <div> <span></span> <span></span> <span></span> </div> </div>
CSS
body, html{ margin: 0; padding: 0; font-family: 'Poppins', sans-serif; line-height:1.5em; font-weight:normal; } body{ scroll-behavior: smooth; background-color: #333; overflow: hidden; } body.no-scroll{ } /* width */ ::-webkit-scrollbar { width: 2px; } /* Track */ ::-webkit-scrollbar-track { background: #000; } /* Handle */ ::-webkit-scrollbar-thumb { background: #fff; transition: all 0.5s; } /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { background: #ccc; } p{ font-family: 'Poppins', sans-serif; font-weight:300; } .upper{ top:0px; left: 0px; display: flex; flex-wrap: nowrap; position: fixed; width: 100%; height: 100vh; justify-content: center; align-items: center; background-color: #efefef; z-index: 999; //overflow: hidden; transition: top 0.5s ease-in-out; } .upper.slide-up{ top:-100vh; } .upper-container{ display: flex; width: 100%; height: 100vh; cursor: pointer; background-position: center center; background-repeat: no-repeat; background-size: cover; z-index: 0; box-shadow: 0 0 black; transition: box-shadow 0.5s ease-in-out; } @media only screen and (max-width: 1023px) { .upper{ flex-wrap: wrap; } .upper-container{ width: 50vw; height: 50vh; } } @media only screen and (max-width: 800px) { .upper-container{ width: 100%; height:25vh; } } .upper-container:nth-child(1){ background-image: url(https://images.unsplash.com/photo-1626187777040-ffb7cb2c5450?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80); } .upper-container:nth-child(2){ background-image: url(https://images.unsplash.com/photo-1497366811353-6870744d04b2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1469&q=80); } .upper-container:nth-child(3){ background-image: url(https://images.unsplash.com/photo-1623177623442-979c1e42c255?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTN8fG1vZGVybiUyMG9mZmljZXxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=500&q=60) } .upper-container:nth-child(4){ background-image: url(https://images.unsplash.com/photo-1610960245237-cfab0dea6be4?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=764&q=80) } .upper-container h2{ color: #fff; font-weight: 600; text-shadow: 0px 0px 6px black; } .upper-container .overlay{ display: flex; flex-wrap: wrap; position: relative; justify-content: center; align-items: center; width: 100%; height: auto; transition: all 0.5s; background-color: rgba(0, 0, 0, 0.37); z-index: 1; } .upper-container:hover{ z-index: 1; box-shadow: 0px 0px 60px black; } .upper-container:hover .overlay{ background-color: rgba(0, 0, 0, 0); } .margin-block{ display: block; position: relative; margin-top:100vh; } .upper-spacer{ display: block; position: relative; height: 100vh; width: 100%; background-color: #336699; } .first-lower{ display: flex; position: relative; left: 0; width: 100%; height: 100vh; justify-content: center; align-items: center; background-color: #ece6e6; z-index: 999; box-shadow: 0px 0px 10px black; } .lower{ display: none; position: relative; left: 0; width: 100%; min-height: 100vh; justify-content: center; align-items: center; background-color: #ece6e6; z-index: 1; height: unset; overflow-y: scroll; } .top-image{ display: block; justify-content: center; align-items: center; position: relative; background-position: center center; background-repeat: no-repeat; background-size: cover; height: 100vh; width: 100%; } .top-image .overlay{ display: flex; justify-content: center; align-items: center; position: relative; height: 100vh; width: 100%; background-color: rgba(0, 0, 0, 0.5); } .top-image .overlay h2{ color: #fff; display: block; position: relative; margin: 0 auto; text-align: center; } .top-image .summary{ color: #fff; display: block; position: relative; margin: 0 auto; max-width: 800px; width: calc(100vw - 40px); font-weight: 300; } .fancy-div{ border-style: solid; border-width: 0 0 1px 0; border-color: #fff; display: block; position: relative; width: calc(500px - 100px); max-width: calc(100vw - 80px); margin: 10px auto 10px auto; opacity: 0.6; } .bottom-arrow{ display: flex; justify-content: center; align-items: center; position: relative; left: 0; width: 100%; height: 40px; opacity: 1; transition: all 0.5s; cursor: pointer; margin-top: 10px; transition: all 0.5s; } .bottom-arrow svg{ width: 20px; fill:#fff !important; background-color: rgba(0, 0, 0, 0.5); padding: 10px 30px 10px 30px; border-style: solid; border-width: 1px; border-color:#999; box-shadow: 0px 0px 22px black; transition: all 0.5s; } .bottom-arrow svg:hover{ padding: 12px 30px 8px 30px; } .top-arrow{ display: flex; justify-content: center; align-items: center; position: absolute; top: 40px; left: 0; width: 100%; height: 40px; transform: rotate(180deg); opacity: 1; transition: all 0.5s; cursor: pointer; } .top-arrow.hide{ opacity: 0; } .top-arrow svg{ width: 60px; fill:#000 !important; background-color: transparent; padding: 10px 80px 10px 80px; border-style: solid; border-width: 1px; border-color:#999; } .lower-copy{ display: block; position: relative; min-height: 100vh; height: auto; width: 100%; background-color: #ece6e6; } .lower.show{ display: block; height: 100vh; } .back-to-top{ display: block; position: absolute; top: 20px; left: 0; width: 100%; text-align: center; } .back-to-top svg{ width: 32px; height: auto; margin: 0 auto; border-style: solid; border-width: 1px; border-color:#999; padding: 0 80px 0 80px; fill:#000; cursor: pointer; transition: all 0.5s; } .back-to-top svg:hover{ background-color: #000; fill:#fff; } .menu-button{ display: flex; align-items: center; justify-content: center; position: fixed; right: -40px; top: 20px; z-index: 999; width: 40px; height: 40px; border-radius: 20px; background-color: rgba(0, 0, 0, 0.76); box-shadow: 0px 0px 20px black; z-index: 9999; color: #fff; cursor: pointer; transition: all 0.5s; } .menu-button.show{ right: 20px; } .menu-button div{ width: 100%; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; } .menu-button span{ display: block; width:60%; height: 2px; margin: 2px 0 2px 0; background-color: #fff; } .main-container{ display: block; position: relative; width: 100%; top: 100px; margin: 0 auto; top: 80px; max-height: calc(100vh - 120px); //overflow-y: scroll; } .flex-container{ display: flex; flex-wrap: wrap; position: relative; margin: 0 auto 60px auto; flex-wrap: wrap; max-width: 1200px; width: calc(100vw - 40px); gap: 0 10px; } .flex-reverse{ flex-direction: row-reverse; } .flex-column{ margin: 0 10px 0 10px; flex: 1 1 300px; } .flex-column img{ max-width: 100%; height: auto; }
JAVASCRIPT
function scrollDown(id){ document.getElementById(id).classList.add("show"); document.querySelector(id).scrollIntoView({ behavior: 'smooth' }); } function hideLower(){ document.querySelector('.lower.show').classList.remove("show"); } function movePanels(id){ document.querySelector('.lower.show').classList.remove("show"); document.querySelector('.upper').classList.add("slide-up"); document.getElementById(id).classList.add("show"); document.querySelector('.menu-button').classList.add("show"); document.querySelector(id).scrollIntoView({ behavior: 'smooth' }); } function backToTop(){ const list = document.querySelectorAll('.top-image'); for (let topimage of list) { topimage.scrollIntoView({ behavior: 'smooth' });} } function showPanels(){ document.querySelector('.upper').classList.remove("slide-up"); window.scroll({top: 0, left: 0, behavior: 'smooth'}); document.querySelector('body').classList.add("no-scroll"); document.querySelector('.menu-button').classList.remove("show"); backToTop(); } function scrollUp(id) { document.getElementById(id).scrollIntoView({ behavior: 'smooth' }); }
Expand for more options Login