cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="wholecontent">
<div class="container dark">
  <img src="http://i58.tinypic.com/2yxnrxl.jpg" width="17px" class="default toggle">
</div>
 
<div class="container light">
  <img src="http://i58.tinypic.com/miozzc.jpg" class="moveable toggle" width="17px">
</div>

<div class="container light intro">
  <div class="circle" id="circle"></div>
  <div class="after">
    <div class="menu">
      <img src="http://i58.tinypic.com/2yxnrxl.jpg" class="moveable toggle" width="17px">
    </div>
    <div class="title">
      <h1>TOM MCLEAN</h1>
      <hr/>
      <h2>Web Design</h2>
    </div>
  </div>
</div>
  
 
<div class="content">
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
</div><!--WHOLE CONTENT-->











<div class="menucontainer">
  <p class="list menuitem">Home</p>
  <p class="list menuitem">About Me</p>
  <p class="list menuitem">Education</p>
  <p class="list menuitem">Web Design</p>
  <p class="list menuitem">Contact Me</p>
  <img src="http://i57.tinypic.com/29x1ye.png" class="closebutton toggle"/>
</div>




<!--
  <h2>Lorem Ipsum</h2>
  <h3>Lorem Ipsum</h3>
  <p class="headline">Lorem Ipsum</p>
  <p class="title">Lorem Ipsum</p>
  <p class="subhead">Lorem Ipsum</p>
  <p class="bodya">Lorem Ipsum</p>
  <p class="bodyb">Lorem Ipsum</p>
  <p class="caption">Lorem Ipsum</p>
  <p class="list">Lorem Ipsum</p>
  <button>Lorem Ipsum</button>
-->
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700,500);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400|Dosis:200,300,400);
* {
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
  box-sizing: border-box;         /* Opera/IE 8+ */
  outline: none;
}
body {
  margin:0px;
  font-family:Roboto;
  background-color:#3f51b5;
}
.intro {
  width:100%;
  height:100vh;
  background-color:#e91e63;
  overflow:hidden;
  position:relative;
  padding:100px;
}
.circle {
  width:0px;
  height:0px;
  background-color:#5677fc;
  border-radius:100%;
  margin-top:0px;
  margin-left:0px;
  top:50%;
  left:50%;
  position:absolute;
}
.intro h1 {
  color:#fff;
  font-weight:300;
  margin:5px 0px;
  font-size:34px;
}
.intro h2 {
  color:#fff;
  font-weight:100;
  font-size:24px;
  margin:5px 0px 5px 90px;
}
hr {
  background-color:#FF4081;
  border:0px;
  height:2px;
  margin:0px;
  padding:0px;
}
.after {
  display:none;
  opacity:0;
}
.default {
  position: fixed;
}
 
.moveable {
  position: absolute;
  margin:20px;
}
.menu {
  position:absolute;
  top:0px;
  left:0px;
}
.content {
  max-width:1000px;
  padding:0px 60px;
  margin:0 auto;
}
h1 {
  font-size:34px;
  color:#757575;
  font-weight:400;
}
h2 {
  font-size:45px;
  color:#757575;
  font-weight:400;
}
h3 {
  font-size:56px;
  color:#757575;
  font-weight:400;
}
.headline {
  font-size:24px;
  color:#212121;
}
.title {
  font-size:20px;
  font-weight:600;
  color:#212121;
}
.subhead {
  font-size:16px;
  color:#212121;
}
.bodya {
  font-size:14px;
  font-weight:600;
  color:#212121;
}
.bodyb {
  font-size:14px;
  color:#212121;
}
.caption {
  font-size:12px;
  color:#757575;
}
.list {
  font-size:14px;
  font-weight:600;
  color:#a9a9a9;
}
.list:hover {
  color:#FF4081;
  cursor:pointer;
}
button {
  font-size:14px;
  font-weight:600;
  text-transform: uppercase;
  color:#212121;
  border:0px solid #757575;
  background-color:#fff;
  padding:10px 20px;
  -moz-box-shadow: 0 0 5px #757575;
  -webkit-box-shadow: 0 0 5px #757575;
  box-shadow: 0px 0px 5px #757575;
}
button:hover {
  -moz-box-shadow: 0 0 8px #757575;
  -webkit-box-shadow: 0 0 8px #757575;
  box-shadow: 0px 1px 8px #757575;
}
button:active {
  -moz-box-shadow: 0 0 5px #757575;
  -webkit-box-shadow: 0 0 5px #757575;
  box-shadow: 0px 0px 5px #757575;
}
.menucontainer {
  position:fixed;
  top:0px;
  left:0px;
  width:300px;
  height:300px;
  background-color:#fff;
  -moz-box-shadow: 0 0 5px #757575;
  -webkit-box-shadow: 0 0 5px #757575;
  box-shadow: 0px 0px 5px #757575;
  padding:10px 20px;
}
.toggle {
  cursor:pointer;
}
.wholecontent {
  position:relative;
  background-color:#fff;
}
.closebutton {
  position:absolute;
  top:0px;
  right:0px;
  margin:10px;
}



.text {
  width:100%;
  padding:50px 150px;
}
.center {
  text-align:center;
}
.center p {
  max-width:500px;
  margin:0 auto;
}
.number {
  border:1px solid #808080;
  border-radius:100%;
  width:40px;
  height:40px;
  padding-top:9px;
  padding-left:15px;
  color:#808080;
}
.table {
  width:100%;
  background-color:#ffffff;
  display:table;
}
.row {
  display:table-row;
  width:100%;
  text-align:center;
}
.item {
  display:table-cell;
  text-align:left;
  width:33%;
  padding:10px;
  margin:0px;
}
.item-header {
  color:#333;
  font-weight:500;
}
.menucontainer p {
  position:relative;
  left:-100px;
  opacity:0;
}

            
          
!
            
              var circle = $("#circle");
var w = window.innerWidth;
var h = window.innerHeight;
var menustate = 0;
var radius = 0;
var i = 0;

if (w>h) {
  radius = w;
}
else {
  radius = h;
}

$(".menucontainer").animate({
  "left":"-300px",
  "top":"-300px"
}, 0);

circle.animate({
  "width":radius+200+"px",
  "height":radius+200+"px",
  "margin-left":-(radius/2)-100+"px",
  "margin-top":-(radius/2)-100+"px"
}, 1000, "swing", function() {
  circle.css({
    "display":"none"
  });
  $(".intro").css({
    "background-color":"#5677fc"
  });
  $(".after").css({
    "display":"block"
  });
  $(".after").animate({
    "opacity":"1"
  }, 1000);
});

var setLogo = function() {
 
  $('.moveable').each(function() {
    $(this).css('top',
      $('.default').offset().top -
      $(this).closest('.container').offset().top
    );
  });
 
};
 
$(document).scroll(function() {
  setLogo();
});
 
setLogo();

$(".toggle").click(function() {
  if(menustate===0) {
    $("body").animate({
      "margin-left":"40px",
      "margin-top":"40px"
    });
    $(".menucontainer").animate({
      "left":"0px",
      "top":"0px"
    }, 500); 
    animateMenu();
    menustate=1;
  }
  else {
    animateMenu();
    menustate=0;
    $("body").animate({
      "margin-left":"0px",
      "margin-top":"0px"
    });
    $(".menucontainer").animate({
      "left":"-300px",
      "top":"-300px"
    });
  }
   
});
/*$(".wholecontent").click(function() {
  if (menustate==1) {
    $("body").animate({
      "margin-left":"0px",
      "margin-top":"0px"
    });
    menustate=0;
  }
});*/

function animateMenu() {
  /*for(i=0; i<5; i++) {
    $('.menucontainer').children().eq(i).animate({
      "left":"0px",
    });
  }*/
  if(menustate===0) {
    $('.menuitem').delay( 300 ).each(function(i) {
      $(this).delay((i++) * 50).animate({
        "left":"0px",
        "opacity":"1",
      }, 300); 
    });
  }
  else {
    $('.menuitem').delay( 300 ).each(function(i) {
      $(this).delay((i++) * 50).animate({
        "left":"-100px",
        "opacity":"0",
      }, 300); 
    });
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console