Pen Settings



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


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


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.


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.


                <div class="wrap">
	<p class="quote">“Wisdom is not a product of schooling but of the lifelong attempt to acquire it.”  <br><br>— Albert Einstein",</p>
	<p class="quote">“Live as if you were to die tomorrow. Learn as if you were to live forever. Always help others in the GreenSock forums.” <br><br>—  Mahatma Gandhi"</p>
	<p class="quote">“Tell me and I forget, teach me and I may remember, involve me and I learn.” <br><br>— Benjamin Franklin"</p>
	<p class="quote">“Study hard what interests you the most in the most undisciplined, irreverent and original manner possible.”<br><br>— Richard Feynman"</p>
	<p class="quote">“It is important that students bring a certain ragamuffin, barefoot irreverence to their studies; they are not here to worship what is known, but to question it.”  <br><br>—  Jacob Bronowski"</p> -->


                @import url(,300);

html, body, .wrap {
	height: 100%;

body {
	background: black;
	overflow: hidden;
	color: white;
	font-family: Open sans;

.wrap {
	max-width: 800px;
	margin: 0 auto;
	position: relative;

h1 {
	position: relative;
	perspective: 500px;
	top: 50%;
	padding: 0 20px;
	transform: translateY(-50%);
	font-weight: 300;
	span {
		opacity: 0;

.quote {
	display: inline-block;
	max-width: 100%;
	left: 0;
	top: 50px;



var quotes = $(".quote");
var dur = 0.5;
var stagger = 0.05;
var pause = 1.5; // quote static time
var overlap = 0.5; // next animation start overlap
var positionParam = 0;
var master = new TimelineMax({});
TweenMax.set(quotes, {autoAlpha:1});

var timelines = []

for (var k = 0; k < quotes.length; k++) {
  var tl = new TimelineMax({paused:true});  
  var mySplitText = new SplitText(quotes[k], {type:"chars, words, lines"});
  tl.staggerFrom(mySplitText.words, dur, {x: -50, opacity: 0}, stagger);
  tl.staggerTo(mySplitText.words, dur, {x: -50, opacity: 0}, stagger, "+=" + pause);
  //call a function to trigger the next timeline
  tl.add(nextTimeline, "-=" + overlap);


var index = 0;
function nextTimeline() {
  if(index >= timelines.length) {
    index = 0;

//build a timelin of all the child timelines tweening. This allows us to animate the first quote timelines[0] at the beginning and end without having to split the text twice or create new animations.

//this could all be done in a loop but its probably easier to read it like this