LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
  
        

So the tale continues

Though, consumed with the hot fire of his purpose, Ahab in all his thoughts and actions ever had in view the ultimate capture of Moby Dick; though he seemed ready to sacrifice all mortal interests to that one passion; nevertheless it may have been that he was by nature and long habituation far too wedded to a fiery whaleman's ways, altogether to abandon the collateral prosecution of the voyage. Or at least if this were otherwise, there were not wanting other motives much more influential with him. It would be refining too much, perhaps, even considering his monomania, to hint that his vindictiveness towards the White Whale might have possibly extended itself in some degree to all sperm whales, and that the more monsters he slew by so much the more he multiplied the chances that each subsequently encountered whale would prove to be the hated one he hunted.

CSS
/*
Just a preloading animation, didn't saw many of them here on Codepen, so I said why not create one ?

Used jQuery's window.load() function, in this demo there is also setTimeot(), cause there is no content to load, so we are simulating it.
*/
@import url(https://fonts.googleapis.com/css?family=Oswald|Josefin+Sans:300);

html {
  box-sizing: border-box;
  font-size: 100%;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* ====  Preloader styles ==== */
#hola{
    width: 100vw;
    height: 100vh;
    background-color: #252328;
    position: fixed;
    z-index: 999;
}
#preloader {
	position:relative;
    width: 80px;
    height: 80px;
    top: 45%;
    margin: 0 auto;
}
#preloader span {
	position:absolute;
	border: 8px solid #ffe066;
	border-top: 8px solid transparent;
	border-radius:999px;
}

#preloader span:nth-child(1){
	width:80px;
	height:80px;
	-webkit-animation: spin-1 2s infinite linear;
	        animation: spin-1 2s infinite linear;
}
#preloader span:nth-child(2){
	top: 20px;
	left: 20px;
	width:40px;
	height:40px;
	-webkit-animation: spin-2 1s infinite linear;
	        animation: spin-2 1s infinite linear;
}
@-webkit-keyframes spin-1 {
	0% {-webkit-transform: rotate(360deg);transform: rotate(360deg); opacity: 1;}
	50% {-webkit-transform: rotate(180deg);transform: rotate(180deg); opacity: 0.5;}
	100% {-webkit-transform: rotate(0deg);transform: rotate(0deg); opacity: 1;}
}
@keyframes spin-1 {
	0% {-webkit-transform: rotate(360deg);transform: rotate(360deg); opacity: 1;}
	50% {-webkit-transform: rotate(180deg);transform: rotate(180deg); opacity: 0.5;}
	100% {-webkit-transform: rotate(0deg);transform: rotate(0deg); opacity: 1;}
}
@-webkit-keyframes spin-2 {
	0% {-webkit-transform: rotate(0deg);transform: rotate(0deg); opacity: 0.5;}
	50% {-webkit-transform: rotate(180deg);transform: rotate(180deg); opacity: 1;}
	100% {-webkit-transform: rotate(360deg);transform: rotate(360deg); opacity: 0.5;}
}
@keyframes spin-2 {
	0% {-webkit-transform: rotate(0deg);transform: rotate(0deg); opacity: 0.5;}
	50% {-webkit-transform: rotate(180deg);transform: rotate(180deg); opacity: 1;}
	100% {-webkit-transform: rotate(360deg);transform: rotate(360deg); opacity: 0.5;}
}

/* ====  Page layout ==== */
.page-wrap{
    overflow-x: hidden;
    height: 100vh;
}

.home{
  height: 100vh;
  position: relative;
  background-color: #F2F6F2;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.home:before{
  position: absolute;
  width: 50%;
  height: 100%;
  z-index: 10;
  top: 0;
  left: 0;
  content: '';
  background-color: #F2F6F2;
}
.home:after{
  position: absolute;
  width: 50%;
  height: 100%;
  z-index: 10;
  top: 0;
  right: 0;
  content: '';
  background-color: #F2F6F2;
}
.animate-border{
  border: 40px solid #EDEBE6;
  -webkit-transition: border .5s .2s ease;
  transition: border .5s .2s ease;
}
.home.divide:before{
  -webkit-transition: all .6s 1.2s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  transition: all .6s 1.2s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  width: 0;
}
.home.divide:after{
  -webkit-transition: all .6s 1.2s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  transition: all .6s 1.2s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  width: 0;
}
.text-wrap{
    width: 100%;
    max-width: 44rem;
    text-align: center;
}
h1{
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-family: 'Oswald';
    color: #5F5264;
    margin-bottom: 3rem;
}
p{
    font-size: 1rem;
    color: #b6ccb6;
    line-height: 1.4;
    font-family: 'Josefin Sans';
}

@media screen and (max-width:1024px){
  html{
    font-size: 92.5%;
  }
}
@media screen and (max-width:640px){
  html{
    font-size: 86%;
  }
  p{
    font-size: 1.1rem;
  }
}
JS
$(window).load(function(){
            setTimeout(function(){
                $('#preloader').velocity({
                    opacity : 0.1,
                    translateY: "-80px"
                }, {
                    duration: 400,
                    complete: function(){
                    $('#hola').velocity({
                    translateY : "-100%"
                }, {
                    duration: 1000,
                    easing: [0.7,0,0.3,1],
                    complete: function(){
                        $('.home').addClass('animate-border divide');
                    }
                })  
                    }
                })
            },1000)
        })
Host Instantly Drag and Drop Website Builder

 

Description

Just a preloading animation, didn't saw much of them here on Codepen, so I was thinking why not create one ?
Term
Mon, 11/27/2017 - 22:13

Related Codes

Pen ID
Pen ID
Pen ID