Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
          <div class="container">
              <svg  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="1920px" height="1080px" preserveAspectRatio="xMidYMid slice">
                <defs>
                  <mask id="mask-cemc" x="0" y="0" width="1920" height="1080" >
                  <rect x="0" y="0" width="1920" height="1080"/>
                    <text class="C create r-cemc " x="600" y="600">C</text>
                    <text class="O r-cemc" x="800" y="600">E</text>
                    <text class="O r-cemc" x="1000"  y="600">M</text>
                    <text class="O r-cemc" x="1200"  y="600">C</text> 
                   <text class="create-r create  r-create" x="600"   y="600">R</text>
                    <text class="create-e empo-e empo r-create "  x="800"  y="600">E</text>
                    <text class="create-a create r-create" x="1000"  y="600">A</text>
                    <text class="create-t create  r-create " x="1200"  y="600">T</text>
                    <text class="create-e2 create r-create " x="1400"  y="600">E</text> 
                  <text class="empowere-M move r-empower  " x="600"  y="600">M</text>
                    <text class="empowere-P empo r-empower " x="800"  y="600">P</text>
                    <text class="empowere-O empo r-empower " x="980"  y="600">O</text>
                    <text class="empowere-W empo r-empower " x="1180"  y="600">W</text>
                    <text class="empowere-E empo r-empower " x="1380"  y="600">E</text>
                    <text class="empowere-R empo r-empower " x="1520"  y="600">R</text> 
                    <text class="move-O move r-move " x="900"  y="600">O</text>
                    <text class="move-V move r-move " x="1050"  y="600">V</text>
                    <text class="move-E move r-move " x="1200"  y="600">E</text>
                       <text class="connect-c3 connect r-connect " x="400"  y="600">C</text>
                     <text class="connect-o2 connect r-connect" x="580"  y="600">O</text>
                    <text class="connect-n3 connect r-connect " x="760"  y="600">N</text>
                    <text class="connect-n4 connect  r-connect" x="940"  y="600">N</text>
                    <text class="connect-e2 connect r-connect "x="1120"  y="600">E</text>
                    <text class="connect-c4 connect  r-connect" x="1300"  y="600">C</text>
                    <text class="connect-t2 connect r-connect " x="1480"  y="600">T</text>
                  </mask>
                </defs>
                <rect x="0" y="0" width="1920" height="1080"/>
              </svg>  
          </div>
             <div class="video"></div>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.0/TweenMax.min.js"></script>
          <script src="main.js"></script>
</body>
</html>
              
            
!

CSS

              
                html{
    height: 100%;
    overflow:hidden;
}
body {
    font-family:  sans-serif;
    height: 100%;
}
svg {
    width: 100%;
    height: 100%;
    position:absolute;
}
svg text {
    text-anchor: middle;
    font-size: 15em;
    font-weight: bold;
}
svg mask rect {
    fill: white;
}
svg > rect {
    fill: rgba(11, 57, 84,.8);
    -webkit-mask: url(#mask-cemc);
    mask: url(#mask-cemc);
}
.container{
    min-width: 100%;
    height: 100vh;
    position: absolute;
    top:50%;
    left: 50%;
    transform: translate(-50%,-50%);
   
}
@media only screen and (max-width: 1024px) {
    svg text {
        font-size: 10em;
    }
  }
  @media only screen and (max-width: 768px) {
    svg text{
        font-size: 6em;
    }
  }
  @media only screen and (max-width: 500px) {
    svg text{
        font-size: 4em;
    }
  }
  .video{
      position: absolute;
      top:0;
      min-width: 100%;
      min-height: 100%;
      z-index: -1;
      left: 0;
      width: 100%;
      height: 100vh;
      background: url(http://3.bp.blogspot.com/-rfoIQltFjlM/UcndLJPsRGI/AAAAAAAAAIg/SsAZElQ7mjo/s1600/newyork.jpg);
      background-size:cover;
      background-position:center;
  }
              
            
!

JS

              
                
var objeto = document.querySelectorAll('.r-cemc'),
objeto2 = document.querySelectorAll('.r-create'),
objeto3 = document.querySelectorAll('.r-empower'),
objeto4 = document.querySelectorAll('.r-move'),
objeto5 = document.querySelectorAll('.r-connect');
var r_cemc = [],
r_create = [],
r_empower = [],
r_move = [],
r_connect = [];

for ( i = 0; i < objeto.length; i++) {
     r_cemc[i] = objeto[i].getAttribute('x');
     
}
for ( i = 0; i < objeto2.length; i++) {
  r_create[i] = objeto2[i].getAttribute('x');
}
for ( i = 0; i < objeto3.length; i++) {
  r_empower[i] = objeto3[i].getAttribute('x');
}
for ( i = 0; i < objeto4.length; i++) {
  r_move[i] = objeto4[i].getAttribute('x');
}
for ( i = 0; i < objeto5.length; i++) {
  r_connect[i] = objeto5[i].getAttribute('x');
}

window.addEventListener("resize", resize);

function resize() {
  width = window.innerWidth;
   if(width > 1025){
    /********* de ++ de 1024  ***************/
    animar();
    for (i = 0; i < r_cemc.length; i++) {
      objeto[i].setAttribute('x',r_cemc[i]);
    }
    for (i = 0; i < r_create.length; i++) {
      objeto2[i].setAttribute('x',r_create[i]);
    }
    for (i = 0; i < r_empower.length; i++) {
      objeto3[i].setAttribute('x',r_empower[i]);
    }
    for (i = 0; i < r_move.length; i++) {
      objeto4[i].setAttribute('x',r_move[i]);
    }
    for (i = 0; i < r_connect.length; i++) {
      objeto5[i].setAttribute('x',r_connect[i]);
    }
  }else if(width <= 1024 && width >= 769 ){
    /********* de 1024 hasta 768 ***************/
    animar();
  for ( i = 0; i < 4; i++) {
    if (i==0) {
      var x = objeto[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = num + 150;
      console.log(sum);
      objeto[i].setAttribute('x',sum);
    }else{
      var x = objeto[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (720 + (150 * i));
      objeto[i].setAttribute('x',sum);
    }
  }
  for ( i = 0; i < 5; i++) {
      var x = objeto2[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (800 + (120 * i));
      objeto2[i].setAttribute('x',sum);
  }
  for ( i = 0; i < 6; i++) {
    if(i==2 || i==5){
    var x = objeto3[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (700 + (125 * i));
    objeto3[i].setAttribute('x',sum);
    }else{
      var x = objeto3[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (700 + (130 * i));
    objeto3[i].setAttribute('x',sum);
    }
  
  }
  for ( i = 0; i < 3; i++) {
    var x = objeto4[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (950 + (120 * i));
    objeto4[i].setAttribute('x',sum);
  }
  for ( i = 0; i < 7; i++) {
    var x = objeto5[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (600 + (120 * i));
    objeto5[i].setAttribute('x',sum);
  }
  }else if(width <= 768 && width >=500){
    /********* de 768 hasta 500 ***************/
    animar();
  for ( i = 0; i < 4; i++) {
    if (i==0) {
      var x = objeto[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = num + 260;
      objeto[i].setAttribute('x',sum);
    }else{
      var x = objeto[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (850 + (75 * i));
      objeto[i].setAttribute('x',sum);
    }
  }
  for ( i = 0; i < 5; i++) {
      var x = objeto2[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (850 + (65 * i));
      objeto2[i].setAttribute('x',sum);
  }
  for ( i = 0; i < 6; i++) {
    if(i==2 || i==5){
    var x = objeto3[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (850 + (70 * i));
    objeto3[i].setAttribute('x',sum);
    }else{
      var x = objeto3[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (850 + (75 * i));
    objeto3[i].setAttribute('x',sum);
    }
  }
  for ( i = 0; i < 3; i++) {
    var x = objeto4[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (950 + (75 * i));
    objeto4[i].setAttribute('x',sum);
  }
  for ( i = 0; i < 7; i++) {
    var x = objeto5[i].getAttribute('x');
    var num = parseInt(x); 
    var sum = (num - num) + (740 + (75 * i));
    objeto5[i].setAttribute('x',sum);
  }
  }else if(width <= 500){
    /***************DE 320PX A 500PX ********************/
   animar();
    for ( i = 0; i < 4; i++) {
      if (i==0) {
        var x = objeto[i].getAttribute('x');
        var num = parseInt(x); 
        var sum = num + 280;
        objeto[i].setAttribute('x',sum);
      }else{
        var x = objeto[i].getAttribute('x');
        var num = parseInt(x); 
        var sum = (num - num) + (875 + (50 * i));

        objeto[i].setAttribute('x',sum);
      }
    }
    for ( i = 0; i < 5; i++) {
        var x = objeto2[i].getAttribute('x');
        var num = parseInt(x); 
        var sum = (num - num) + (900 + (44 * i));

        objeto2[i].setAttribute('x',sum);
    }
    for ( i = 0; i < 6; i++) {
      if(i==2 || i==5){
      var x = objeto3[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (865 + (47 * i));
      objeto3[i].setAttribute('x',sum);
      }else{
        var x = objeto3[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (865 + (49 * i));
      objeto3[i].setAttribute('x',sum);
      }
    }
    for ( i = 0; i < 3; i++) {
      var x = objeto4[i].getAttribute('x');
      var num = parseInt(x); 
      var sum = (num - num) + (950 + (47 * i));
      objeto4[i].setAttribute('x',sum);
    }
    for ( i = 0; i < 7; i++) {
      if(i==4 || i==5 || i==6 ){
        var x = objeto5[i].getAttribute('x');
        var num = parseInt(x); 
        var sum = (num - num) + (820 + (46 * i));
        objeto5[i].setAttribute('x',sum);
        }else{
        var x = objeto5[i].getAttribute('x');
        var num = parseInt(x); 
        var sum = (num - num) + (815 + (49 * i));
        objeto5[i].setAttribute('x',sum);
        }
    }
  }
}
resize();
var sm = 0;
var md = 0;
var lg = 0;
var xl = 0;

function animar(){
  if(width <= 500 && sm == 0 ){
    sm = 1;
    md = 0;
    lg = 0;
    xl = 0;
    console.log("sm");
    one=-27.5,two=-130,three=27.5;
    console.log(one + two + three);
    animacion(one,two,three);
  }else if(width > 500  && width <= 768 && md == 0 ){
    sm = 0;
    md = 1;
    lg = 0;
    xl = 0;
    console.log("md");
   one = -75, two = 145,three=20;
    animacion(one,two,three);
  }else if(width > 769 && width <= 1024 && lg == 0){
    sm = 0;
    md = 0;
    lg = 1;
    xl = 0;
    console.log("lg");
   one = -80,two =-350,three=100;
    animacion(one,two,three);
  }else if(width > 1024 && xl == 0){
    md = 0;
    sm = 0;
    lg = 0;
    xl = 1;
    one = -200,two = -400,three=100;
    animacion(one,two,three);
    console.log("xl");
  }
}


if(width <= 500){
  var one=-27.5,two=-130,three=27.5;
}else if(width > 500  && width <= 768 ){
 var one = -75, two = -145,three=20;
}else if(width > 769 && width <= 1024){
 var one = -80,two =-350,three=100;
}else if(width > 1024){
  var one = -200,two = -400,three=100;
}

var animation = new TimelineMax({repeat:-1,delay:.6});
  animation.to(".C",.5,{x:one})
  .to(".O",.5,{opacity:0})
  .from(".create-r",.5,{y:100,opacity:0})
  .from(".create-e",.5,{y:100,opacity:0})
  .from(".create-a",.5,{y:100,opacity:0})
  .from(".create-t",.5,{y:100,opacity:0})
  .from(".create-e2",.5,{y:100,opacity:0})
  .to(".create",.5,{opacity:0,opacity:0})
  .to(".empo-e",.5,{x:two})
  .from(".empowere-M",.5,{y:100,opacity:0})
  .from(".empowere-P",.5,{y:100,opacity:0})
  .from(".empowere-O",.5,{y:100,opacity:0})
  .from(".empowere-W",.5,{y:100,opacity:0})
  .from(".empowere-E",.5,{y:100,opacity:0})
  .from(".empowere-R",.5,{y:100,opacity:0})
  .from(".empowere-E2",.5,{y:100})
  .to(".empo",.5,{opacity:0})
  .to(".empowere-M",.5,{x:three,})
  .from(".move-O",.5,{y:100,opacity:0})
  .from(".move-V",.5,{y:100,opacity:0})
  .from(".move-E",.5,{y:100,opacity:0})
  .to(".move",.5,{opacity:0})
  .from(".connect-c3",.5,{y:100,opacity:0})
  .from(".connect-o2",.5,{y:100,opacity:0})
  .from(".connect-n3",.5,{y:100,opacity:0,})
  .from(".connect-n4",.5,{y:100,opacity:0})
  .from(".connect-e2",.5,{y:100,opacity:0})
  .from(".connect-c4",.5,{y:100,opacity:0})
  .from(".connect-t2",.5,{y:100,opacity:0})
  .to(".connect",.5,{opacity:0})

  function animacion(one,two,three){
    animation.updateTo(".C",.5,{x:one}, false);
    animation.updateTo(".empo-e",.5,{x:two}, false);
    animation.updateTo(".empowere-M",.5,{x:three}, false);
    animation.restart();
  }


              
            
!
999px

Console