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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                	<header id="header">
			<h1><span>GreenSock 101</span><em></em></h1>
			<p class="intro">Your first hour with GSAP, <br /><em>make sure it is a good one</em>.</p>
			<img src="https://greensock.com/wp-content/themes/greensock/images/greensock-logo.svg" alt="GreenSock 101 - Getting started with GreenSock in 60 minutes.">

			<h2>Table Of Content</h2>
			<ul class="list">
					<li><a href=""><span><strong>Lesson 1</strong> - Selectors - jQuery vs JavaScript</span></a></li>
					<li><a href=""><span><strong>Lesson 1</strong> - Selectors - jQuery vs JavaScript</span></a></li>
					<li><a href=""><span><strong>Lesson 1</strong> - Selectors - jQuery vs JavaScript</span></a></li>
					<li><a href=""><span><strong>Lesson 1</strong> - Selectors - jQuery vs JavaScript</span></a></li>
					<li><a href=""><span><strong>Lesson 1</strong> - Selectors - jQuery vs JavaScript</span></a></li>
			</ul>
	</header>

<!-- jQuery -->
<script
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>

<!--- The following scripts are necessary to do TweenLite tweens on CSS properties -->
<script type="text/javascript"  src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenLite.min.js"></script>
<script type="text/javascript"  src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenMax.min.js"></script>
<script type="text/javascript"  src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/plugins/CSSPlugin.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/easing/EasePack.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TimelineLite.min.js"></script>







<!-- Custom Animations -->
<script type="text/javascript" src="js/animations.js"></script>


              
            
!

CSS

              
                .clear:before, .clear:after {
  content: ' ';
  display: table; }

.clear {
  *zoom: 1; }
  .clear:after {
    clear: both; }

/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%; }

body {
  margin: 0; }

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
  display: block; }

audio, canvas, progress, video {
  display: inline-block;
  vertical-align: baseline; }

audio:not([controls]) {
  display: none;
  height: 0; }

[hidden], template {
  display: none; }

a {
  background-color: transparent; }

a:active, a:hover {
  outline: 0; }

abbr[title] {
  border-bottom: 1px dotted; }

b, strong {
  font-weight: 700; }

dfn {
  font-style: italic; }

h1 {
  font-size: 2em;
  margin: .67em 0; }

mark {
  background: #ff0;
  color: #000; }

small {
  font-size: 80%; }

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline; }

sup {
  top: -.5em; }

sub {
  bottom: -.25em; }

img {
  border: 0; }

svg:not(:root) {
  overflow: hidden; }

figure {
  margin: 1em 40px; }

hr {
  box-sizing: content-box;
  height: 0; }

pre {
  overflow: auto; }

code, kbd, pre, samp {
  font-family: monospace,monospace;
  font-size: 1em; }

button, input, optgroup, select, textarea {
  color: inherit;
  font: inherit;
  margin: 0; }

button {
  overflow: visible; }

button, select {
  text-transform: none; }

button, html input[type=button], input[type=reset], input[type=submit] {
  -webkit-appearance: button;
  cursor: pointer; }

button[disabled], html input[disabled] {
  cursor: default; }

button::-moz-focus-inner, input::-moz-focus-inner {
  border: 0;
  padding: 0; }

input {
  line-height: normal; }

input[type=checkbox], input[type=radio] {
  box-sizing: border-box;
  padding: 0; }

input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button {
  height: auto; }

input[type=search] {
  -webkit-appearance: textfield;
  box-sizing: content-box; }

input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration {
  -webkit-appearance: none; }

fieldset {
  border: 1px solid silver;
  margin: 0 2px;
  padding: .35em .625em .75em; }

legend {
  border: 0;
  padding: 0; }

textarea {
  overflow: auto; }

optgroup {
  font-weight: 700; }

table {
  border-collapse: collapse;
  border-spacing: 0; }

td, th {
  padding: 0; }

/*! HTML5 Boilerplate v5.0 | MIT License | http://h5bp.com/ */
html {
  color: #222;
  font-size: 1em;
  line-height: 1.4; }

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none; }

::selection {
  background: #b3d4fc;
  text-shadow: none; }

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0; }

audio, canvas, iframe, img, svg, video {
  vertical-align: middle; }

fieldset {
  border: 0;
  margin: 0;
  padding: 0; }

textarea {
  resize: vertical; }

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0; }

/* ===== Initializr Styles ==================================================
   Author: Jonathan Verrecchia - verekia.com/initializr/responsive-template
   ========================================================================== */
body {
  font: 16px/26px 'Open Sans', Helvetica, Helvetica Neue, Arial;
  background-color: #76c897;
  color: #2b4d66;
  padding-bottom: 200px; }

h1 {
  text-transform: uppercase;
  font-size: 40px;
  margin-bottom: 35px;
  line-height: 1.5em; }
  h1 span {
    display: block; }
  h1 em {
    background-color: #b1dec7;
    height: 5px;
    width: 200px;
    display: block;
    margin: 0 auto;
    position: relative;
    bottom: -14px; }

.intro {
  color: #fff;
  font-size: 30px;
  margin-bottom: 50px;
  line-height: 1.2em; }

/* =Header */
header {
  max-width: 500px;
  padding-top: 15px;
  margin: 0 auto;
  text-align: center; }
  header em {
    color: rgba(255, 255, 255, 0.6); }
  header img {
    max-width: 100%;
    display: block; }

h2 {
  background-color: #2b4d66;
  color: #fff;
  text-transform: uppercase;
  font-weight: normal;
  margin: 0 5px 0 2px;
  font-size: 20px;
  padding: 10px 0; }

.list {
  list-style: none;
  text-align: left;
  margin: 0 5px 0 2px;
  padding: 0;
  font-size: 20px; }
  .list a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #2b4d66;
    background-color: #ebf3f7; }
    .list a span {
      -webkit-transition: all 0.2s ease-out;
              transition: all 0.2s ease-out;
      position: relative;
      left: 0; }
    .list a:hover {
      background-color: rgba(235, 243, 247, 0.7); }
      .list a:hover span {
        left: 8px;
        -webkit-transition: all 0.2s ease-out;
                transition: all 0.2s ease-out; }
  .list li {
    margin: 0 0 1px 0;
    padding: 0; }

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
/* ==========================================================================
   Media Queries
   ========================================================================== */
/* ==========================================================================
   Helper classes
   ========================================================================== */
.hidden {
  display: none !important;
  visibility: hidden; }

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px; }

.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto; }

.invisible {
  visibility: hidden; }

.clearfix:before, .clearfix:after {
  content: " ";
  display: table; }

.clearfix:after {
  clear: both; }

.clearfix {
  *zoom: 1; }

/* ==========================================================================
   Print styles
   ========================================================================== */
@media print {
  *, *:before, *:after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important; }
  a, a:visited {
    text-decoration: underline; }
  a[href]:after {
    content: " (" attr(href) ")"; }
  abbr[title]:after {
    content: " (" attr(title) ")"; }
  a[href^="#"]:after, a[href^="javascript:"]:after {
    content: ""; }
  pre, blockquote {
    border: 1px solid #999;
    page-break-inside: avoid; }
  thead {
    display: table-header-group; }
  tr, img {
    page-break-inside: avoid; }
  img {
    max-width: 100% !important; }
  p, h2, h3 {
    orphans: 3;
    widows: 3; }
  h2, h3 {
    page-break-after: avoid; } }

@media print {
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important; }
  a, a:visited {
    text-decoration: underline; }
  a[href]:after {
    content: " (" attr(href) ")"; }
  abbr[title]:after {
    content: " (" attr(title) ")"; }
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {
    content: ""; }
  pre, blockquote {
    border: 1px solid #999;
    page-break-inside: avoid; }
  thead {
    display: table-header-group; }
  tr, img {
    page-break-inside: avoid; }
  img {
    max-width: 100% !important; }
  @page {
    margin: 0.5cm; }

  p, h2, h3 {
    orphans: 3;
    widows: 3; }
  h2, h3 {
    page-break-after: avoid; } }

              
            
!

JS

              
                (function($){

			var img = $('img');
			var h2 = $('h2');
			var h1 = $('h1');
			var intro = $('.intro');
			var listItem = $('ul li');
			var tl = new TimelineLite();


			tl.from(h1, 0.3, {y:-15, autoAlpha:0, ease:Power1.easeOut, delay:0.2}),
				tl.from(intro, 0.3, {y:-15, autoAlpha:0, ease:Power1.easeOut, delay:0.4}),
				tl.from(img, 0.3, {y:-15, autoAlpha:0, ease:Power1.easeOut, delay:0.6}),
				tl.from(h2, 0.3, {y:-15, autoAlpha:0, ease:Power1.easeOut, delay:0.8}),
				tl.from(listItem, 0.3, {y:-15, autoAlpha:0, ease:Power1.easeOut, delay:1});

})(jQuery);
              
            
!
999px

Console