LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

L o a d i n g

CSS
/* The hover effect */
span {
  transform-origin: 50% 50% 80px;
  transform: rotateX(0deg);
  position: absolute;
  width: 20px;
}

h1.no-transition span {
  transition: all 0s !important;
  transform: rotateX(0deg) !important;
}

span:nth-child(1) {
  transition: all 0.7s ease 0.125s;
  left: 31px;
}

span:nth-child(2) {
  transition: all 0.7s ease 0.25s;
  left: 62px;
}

span:nth-child(3) {
  transition: all 0.7s ease 0.375s;
  left: 93px;
}

span:nth-child(4) {
  transition: all 0.7s ease 0.5s;
  left: 124px;
}

span:nth-child(5) {
  transition: all 0.7s ease 0.625s;
  left: 155px;
}

span:nth-child(6) {
  transition: all 0.7s ease 0.75s;
  left: 186px;
}

span:nth-child(7) {
  transition: all 0.7s ease 0.875s;
  left: 217px;
}

h1:hover span {
  transform: rotateX(360deg);
  color: deeppink;
}

/* Beautifications */
html {
  height: 100%;
}

body {
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  font-weight: bold;
  text-transform: uppercase;
  font-family: Monaco, Consolas, "Lucida Console", monospace;
  font-smoothing: antialiased;
  perspective: 700px;
  transform-style: preserve-3d;
  background-color: #ffffff;
  *zoom: 1;
  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=1, startColorstr='#FFFFFFFF', endColorstr='#FFEAE0DE');
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IiIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZTBkZSIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  background-size: 100%;
  background-image: -moz-radial-gradient(center, ellipse cover, #ffffff 0%, #eae0de 100%);
  background-image: -webkit-radial-gradient(center, ellipse cover, #ffffff 0%, #eae0de 100%);
  background-image: radial-gradient(ellipse cover at center, #ffffff 0%, #eae0de 100%);
}

h1 {
  position: relative;
  margin-top: -40px;
  top: 50%;
  width: 260px;
  height: 55px;
  margin-left: -130px;
  cursor: pointer;
  left: 50%;
  font-size: 47px;
  color: #556270;
}

.transition span {
  transform: rotateX(360deg);
}
JS
var container = document.querySelector( 'h1' );
var palette = [ '#4ECDC4', '#A9CF54', '#FF6B6B', '#556270']
var paletteIndex = 0;

setInterval( function() {
  
  // Reset spans rotation without transitions
  container.className = 'no-transition';
  
  // Debounce change to allow for css changes
  setTimeout( function() {
    container.style.color = palette[paletteIndex];
    container.className = 'transition';
    paletteIndex += 1;
    paletteIndex %= palette.length;
  }, 10 );
  
  
}, 2500 );
Host Instantly Drag and Drop Website Builder

 

Description

Type loader using css3 transforms for the codepen pattern rodeo.
Term
Mon, 11/27/2017 - 22:10

Related Codes

Pen ID
Pen ID
Pen ID