Reveal

In this example below you will see how to do a Reveal with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by celli, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright celli ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Reveal</title>
  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="revealContainer">
<div class="revealStrip" id="reveal1"></div>
  <div class="revealStrip" id="reveal2"></div>
  <div class="revealStrip" id="reveal3"></div>
  <div class="revealStrip" id="reveal4"></div>
  <div class="revealStrip" id="reveal5"></div>
  <div class="revealStrip" id="reveal6"></div>
  <div class="revealStrip" id="reveal7"></div>
  <div class="revealStrip" id="reveal8"></div>
<svg version="1.1" id="roundRevealStroke" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="142" height="142" viewBox="0 0 142 142" style="enable-background:new 0 0 142 142;" xml:space="preserve"><circle class="circleStroke" cx="71" cy="71" r="35"/><polygon class="miceliM" points="86,60.1 71,68.5 56,60.1 39.9,60.1 39.9,82 55.1,82 55.1,73.1 71,82.6 86.9,73.1 86.9,82 102.1,82 
	102.1,60.1 "/></svg>
</div>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/DrawSVGPlugin.js?r=11'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/celli/reveal-grKQVb */
body, html{margin:0; padding:0; background:#222222;}

/* initial load reveal sequence */
#revealContainer{position:absolute; width:100%; height:100%; z-index:999;}
.revealStrip{background:#384144; width:12.5%; height:100vh;float:left; display:inline; text-align:left;margin:0; padding:0; visibility:visible;}
.circleStroke{fill:none;stroke:#FFFFFF;stroke-miterlimit:40; stroke-width:2;}
#roundRevealStroke{position:absolute; left:50%; top:50%; background:transparent;}
.miceliM{fill:#ffffff; visibility:hidden;}

/*Downloaded from https://www.codeseek.co/celli/reveal-grKQVb */
// initial load reveal sequence setup
TweenMax.set(".revealStrip", {transformOrigin:"100% 100%"});
TweenMax.set("#roundRevealStroke", {transformOrigin:"50% 50%",xPercent: -50, yPercent: -100});
TweenMax.set(".circleStroke", {rotation:-90, transformOrigin:"50% 50%"} );
TweenMax.set(".miceliM", {scale:0.65, transformOrigin:"50% 50%"} );

// initial load reveal sequence
var tlRevealer = new TimelineMax({});
 tlRevealer
  .from(".circleStroke", 1.2, {drawSVG:"0% 0%", ease:Expo.easeInOut}, "0")
 .from(".miceliM", 1.2, {autoAlpha:0, ease:Expo.easeInOut}, "0")
 .to(".circleStroke, .miceliM", 1.2, {opacity:0.0})
  .staggerTo(".revealStrip", .75, {scaleY:.001, delay:0.5, ease:Expo.easeOut}, 0.08, "-=1.2");


 // click
//var controller = $("#run");
//controller.click(function () {
   // TweenMax.staggerTo(".revealStrip" , .25, {height:"0vh"})
      //  });

Comments