Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <p id="text">Converting CSS3 Animations and Transitions to a GSAP Timeline<br>CSS3 Animation/ Transitions Only Demo Found <a href="https://codepen.io/NobodyRocks/pen/qzfoc/" target="_blank">Here</a></p>

<div id="container">
  <p><a id="red" href="javascript:;">GLOW 1</a></p>
  <p><a id="blue" href="javascript:;">GLOW 2</a></p>
  <p><a id="yellow" href="javascript:;">GLOW 3</a></p>
  <p><a id="green" href="javascript:;">GLOW 4</a></p>
  <p><a id="orange" href="javascript:;">GLOW 5</a></p>
  <p><a id="violet" href="javascript:;">GLOW 6</a></p>
</div>
              
            
!

CSS

              
                /*setup*/
@font-face {
  font-family: 'Monoton';
  font-style: normal;
  font-weight: 400;
  src: local('Monoton'), local('Monoton-Regular'), url(http://themes.googleusercontent.com/static/fonts/monoton/v4/AKI-lyzyNHXByGHeOcds_w.woff) format('woff');
}

@font-face {
  font-family: 'Iceland';
  font-style: normal;
  font-weight: 400;
  src: local('Iceland'), local('Iceland-Regular'), url(http://themes.googleusercontent.com/static/fonts/iceland/v3/F6LYTZLHrG9BNYXRjU7RSw.woff) format('woff');
}

@font-face {
  font-family: 'Pacifico';
  font-style: normal;
  font-weight: 400;
  src: local('Pacifico Regular'), local('Pacifico-Regular'), url(http://themes.googleusercontent.com/static/fonts/pacifico/v5/yunJt0R8tCvMyj_V4xSjafesZW2xOQ-xsNqO47m55DA.woff) format('woff');
}

@font-face {
  font-family: 'PressStart';
  font-style: normal;
  font-weight: 400;
  src: local('Press Start 2P'), local('PressStart2P-Regular'), url(http://themes.googleusercontent.com/static/fonts/pressstart2p/v2/8Lg6LX8-ntOHUQnvQ0E7o3dD2UuwsmbX3BOp4SL_VwM.woff) format('woff');
}

@font-face {
  font-family: 'Audiowide';
  font-style: normal;
  font-weight: 400;
  src: local('Audiowide'), local('Audiowide-Regular'), url(http://themes.googleusercontent.com/static/fonts/audiowide/v2/8XtYtNKEyyZh481XVWfVOj8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}

@font-face {
  font-family: 'Vampiro One';
  font-style: normal;
  font-weight: 400;
  src: local('Vampiro One'), local('VampiroOne-Regular'), url(http://themes.googleusercontent.com/static/fonts/vampiroone/v3/Ho2Xld8UbQyBA8XLxF1_NYbN6UDyHWBl620a-IRfuBk.woff) format('woff');
}


* {
  margin: 0;
  padding: 0;
}

html{
  font-size:12px;
}

body {
  background-color: #000000;
}

#text {
  height:30px;
}

#text, 
#text a{
  color:#FFF;
  font-size:12px;
  font-family:Arial, san-serif;
  line-height:1.5rem;
  float:none;
  width:auto;
}

#text a{
  text-decoration:underline;
  cursor:pointer;
  pointer-events:auto!important;
}

#text a:hover {
  color:#FFDD1B;
}

#container {
  width: 100%;
  margin: 0 auto;
}

/*neon*/

p {
  text-align: center;
  font-size: 7rem;
  margin: 20px 0 20px 0;
  padding:0;
  width:50%;
  height:9rem;
  float:left;
  box-sizing:padding-box;
}

a {
  text-decoration: none;
  pointer-events:none;
}

#red{
  color:#FF1177;
  font-family: Monoton;
  text-shadow: 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #FF1177, 0 0 0 #FF1177, 0 0 0 #FF1177, 0 0 0 #FF1177, 0 0 0 #FF1177;
}

#red.redGlow {
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #FF1177, 0 0 35px #FF1177, 0 0 40px #FF1177, 0 0 50px #FF1177, 0 0 75px #FF1177;
}

#blue {
  font-size: 1.5em;
  color: #228DFF;
  font-family: Iceland;
  text-shadow: 0 0 0 #FFFFFF, 0 0 0 #FFFFFF, 0 0 0 #FFFFFF, 0 0 0 #228DFF, 0 0 0 #228DFF, 0 0 0 #228DFF, 0 0 0 #228DFF, 0 0 0 #228DFF;
}

#blue.blueGlow {
  color:#FFFFFF;
  text-shadow: 0 0 10px #FFFFFF, 0 0 20px #FFFFFF, 0 0 30px #FFF, 0 0 40px #228DFF, 0 0 70px #228DFF, 0 0 80px #228DFF, 0 0 100px #228DFF, 0 0 150px #228DFF;
  
}

#yellow {
  color: #FFDD1B;
  font-family: Pacifico;
  text-shadow: 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #FFDD1B, 0 0 0 #FFDD1B, 0 0 0 #FFDD1B, 0 0 0 #FFDD1B, 0 0 0 #FFDD1B;
}

#yellow.yellowGlow{
  color: #ffffff;
   text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #FFDD1B, 0 0 35px #FFDD1B, 0 0 40px #FFDD1B, 0 0 50px #FFDD1B, 0 0 75px #FFDD1B;
}

#green {
  color: #B6FF00;
  font-family: PressStart;
  font-size: 0.8em;
  text-shadow: 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #B6FF00, 0 0 0 #B6FF00, 0 0 0 #B6FF00, 0 0 0 #B6FF00, 0 0 0 #B6FF00;
  
}

#green.greenGlow {
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #B6FF00, 0 0 35px #B6FF00, 0 0 40px #B6FF00, 0 0 50px #B6FF00, 0 0 75px #B6FF00;
}

#orange {
  color: #FF9900;
  font-family: Audiowide;
  text-shadow: 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #FF9900, 0 0 0 #FF9900, 0 0 0 #FF9900, 0 0 0 #FF9900, 0 0 0 #FF9900;
  
}

#orange.orangeGlow {
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #FF9900, 0 0 35px #FF9900, 0 0 40px #FF9900, 0 0 50px #FF9900, 0 0 75px #FF9900;
}

#violet {
  color: #BA01FF;
  font-family: Vampiro One;  
  text-shadow: 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #fff, 0 0 0 #ff00de, 0 0 0 #ff00de, 0 0 0 #ff00de, 0 0 0 #ff00de, 0 0 0 #ff00de;
}

#violet.violetGlow {
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff00de, 0 0 35px #ff00de, 0 0 40px #ff00de, 0 0 50px #ff00de, 0 0 75px #ff00de;
}

p a:hover {
  color: #ffffff;
}

/*RESPONSIVE*/
/*@media (max-width: 1750px) {
  #container {
    width: 100%;
  }
  p {
    font-size: 4.5em;
  }
}

@media (max-width: 1550px) {
  #container {
    width: 100%;
  }
  p {
    font-size: 5.5em;
  }

@media (max-width: 1150px) {
  #container {
    width: 100%;
  }
  p {
    font-size: 4.5em;
    width:50%;
  }
}*/

@media (max-width: 650px) {
  #container {
    width: 100%;
  }
  p {
    font-size: 3.5rem;
    width:100%;
  }
}
/*
@media (max-width: 400px) {
  #container {
    width: 100%;
  }
  p {
    font-size: 3.5em;
    width:100%;
  }
}*/
              
            
!

JS

              
                // red glow
function redGlow(){

  var tlRed = new TimelineMax();
  
  tlRed
  .to("#red", 2, {
    className: "+=redGlow"
  })
  .to("#red", 2, {
    className: "-=redGlow",
  }, "+=1");
  
  return tlRed;
}  
 

// blue glow
function blueGlow(){
  
  var tlBlue = new TimelineMax();
  
  tlBlue
  .to("#blue", 2, {
    className: "+=blueGlow"
  })
  .to("#blue", 2, {
    className: "-=blueGlow",
  }, "+=1");
  
  return tlBlue;
}


// yellow glow
function yellowGlow(){
  
  var tlYellow = new TimelineMax();
  
  tlYellow
  .to("#yellow", 2, {
    className: "+=yellowGlow"
  })
  .to("#yellow", 2, {
    className: "-=yellowGlow",
  }, "+=1");
  
  return tlYellow;
}

// green glow
function greenGlow(){
  
  var tlGreen = new TimelineMax();
  
  tlGreen
  .to("#green", 2, {
    className: "+=greenGlow"
  })
  .to("#green", 2, {
    className: "-=greenGlow",
  }, "+=1");
  
  return tlGreen;
}

// orange glow
function orangeGlow(){
  
  var tlOrange = new TimelineMax();
  
  tlOrange
  .to("#orange", 2, {
    className: "+=orangeGlow"
  })
  .to("#orange", 2, {
    className: "-=orangeGlow",
  }, "+=1");
  
  return tlOrange;
}

// violet glow
function violetGlow(){
  
  var tlViolet = new TimelineMax();
  
  tlViolet
  .to("#violet", 2, {
    className: "+=violetGlow"
  })
  .to("#violet", 2, {
    className: "-=violetGlow",
  }, "+=1");
  
  return tlViolet;
}


// master timeline
var tlMaster = new TimelineMax({
  paused:true,
  repeat:-1,
  repeatDelay:1
});

tlMaster
.add(redGlow(),0)
.add(blueGlow(),0)
.add(yellowGlow(),0)
.add(greenGlow(),0)
.add(orangeGlow(),0)
.add(violetGlow(),0)
.progress(1).progress(0)
.play();
              
            
!
999px

Console