Fullscreen Overlay Effects

Some simple and creative overlay styles and effects. From sliding the overlay into the viewport to using SVG morphing shapes, we explore some effects for fullscreen overlays.

FullscreenOverlayStyles

View demo Download source

Today we’d like to share some inspiration on fullscreen overlay styles and effects with you. Like with any UI component, there are new trends and styles emerging and we’d like to try out some subtle, as well as fancy effects for overlays. The special thing about these overlays is that they don’t have a fixed size like modals but they occupy all the screen, so when creating effects one has to take that into account and not overdo it. But that does not mean that we can’t go crazy and use some fresh and interesting effects, like, for example, morphing SVG shapes.

Note that these effects were created with modern browsers in mind so they might not show the desired effect in older ones. You should, of course, provide some kind of fallback for older browsers.

An example for a subtle, yet interesting effect is the first one which got inspired by the same effect on Huge. The idea is to fade in the overlay and to rotate what’s inside slightly in 3D:

.overlay-hugeinc {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s, visibility 0s 0.5s;
}

.overlay-hugeinc.open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.5s;
}

.overlay-hugeinc nav {
	perspective: 1200px;
}

.overlay-hugeinc nav ul {
	opacity: 0.4;
	transform: translateY(-25%) rotateX(35deg);
	transition: transform 0.5s, opacity 0.5s;
}

.overlay-hugeinc.open nav ul {
	opacity: 1;
	transform: rotateX(0deg);
}

.overlay-hugeinc.close nav ul {
	transform: translateY(25%) rotateX(-35deg);
}

We use the visibility trick to make the overlay disappear completely: we set a transition delay for the visibility property which allows the opacity to be transitioned first.

For some of the SVG examples we use Snap.svg to morph a path into another one. For the “little boxes” example we used SVG with some JS to control the appearing of the boxes, but you could of course also use CSS for the control or not use SVG at all.

We hope you enjoy these effects and find them inspiring!

View demo Download source

Previous:
Next:

Tagged with:

Mary Lou (Manoela Ilic) is a freelance web designer and developer with a passion for interaction design. She studied Cognitive Science and Computational Logic and has a weakness for the smell of freshly ground peppercorns.

View all contributions by

Website: http://tympanus.net/

Related Articles

Feedback 119

  1. 2

    Hi,
    anyone know how to make items appearance change (underline, blur or … whatever) of the current page?

    Many thanks.

  2. 3

    This is awesome and works great. However, my nav is a bit long and can get cutoff if it’s a smaller viewport. Is there any tweak to allow for scrolling if need be? When i use my scrollbar, it’s just scrolling the site behind the overlay.

    Thanks!

  3. 5

    Here is how I managed to have more than one buttons/overlays per page:


    function fullScreenOverlay() {
    var overlayQty = document.querySelectorAll('div.overlay').length;
    for (i = 1; i <= overlayQty; i++) {
    (function() {
    var container = document.getElementById( 'main-container' ),
    triggerBttn = document.getElementById( 'trigger-overlay' + i ),
    overlay = document.querySelector( '.overlay'+ i ),
    closeBttn = overlay.querySelector( '.overlay-close' );
    transEndEventNames = {
    'WebkitTransition': 'webkitTransitionEnd',
    'MozTransition': 'transitionend',
    'OTransition': 'oTransitionEnd',
    'msTransition': 'MSTransitionEnd',
    'transition': 'transitionend'
    },
    transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
    support = { transitions : Modernizr.csstransitions };

    function toggleOverlay() {
    if( classie.has( overlay, 'open' ) ) {
    classie.remove( overlay, 'open' );
    classie.remove( container, 'overlay-open' );
    classie.add( overlay, 'close' );
    var onEndTransitionFn = function( ev ) {
    if( support.transitions ) {
    if( ev.propertyName !== 'visibility' ) return;
    this.removeEventListener( transEndEventName, onEndTransitionFn );
    }
    classie.remove( overlay, 'close' );
    };
    if( support.transitions ) {
    overlay.addEventListener( transEndEventName, onEndTransitionFn );
    }
    else {
    onEndTransitionFn();
    }
    }
    else if( !classie.has( overlay, 'close' ) ) {
    classie.add( overlay, 'open' );
    classie.add( container, 'overlay-open' );
    }
    }

    triggerBttn.addEventListener( 'click', toggleOverlay );
    closeBttn.addEventListener( 'click', toggleOverlay );

    })();

    }
    }

    • 6

      Hey great, I’m looking for a solution like this but it doesn’t work. Can you tell me which Code I have to replace or what do I have to do with my HTM/CSS tags? Sorry but JS is totally new for me.

    • 7

      Great, that is what I was looking for. Unfortunately, I do not get it to work. Can you tell me what I have to change in the html or css code? Am a total newbie in js.

  4. 9

    Hi,

    for Miha and those who want to disable scroll when it’s visible, here’s my way, simple but pretty efficient:

    $.fn.fullpage.setKeyboardScrolling(false);
    $.fn.fullpage.setAllowScrolling(false);
    $.fn.fullpage.setMouseWheelScrolling(false);

    and

    $.fn.fullpage.setKeyboardScrolling(false);
    $.fn.fullpage.setAllowScrolling(false);
    $.fn.fullpage.setMouseWheelScrolling(false);


    ...

    function toggleOverlay() {
    if( classie.has( overlay, 'open' ) ) {
    $.fn.fullpage.setKeyboardScrolling(true);
    $.fn.fullpage.setAllowScrolling(true);
    $.fn.fullpage.setMouseWheelScrolling(true);
    classie.remove( overlay, 'open' );
    ...


    ...

    else if( !classie.has( overlay, 'close' ) ) {
    $.fn.fullpage.setKeyboardScrolling(false);
    $.fn.fullpage.setAllowScrolling(false);
    $.fn.fullpage.setMouseWheelScrolling(false);
    classie.add( overlay, 'open' );
    ...

    I think it could help ;)

Follow this discussion

Leave a Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>