Pen Settings



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


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.


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.


 <div class="fillViewport blue">
	<h1>scroll down to trigger the animation</h1>

<div class="masthead fillViewport" role="img" aria-label="Image Description">
  <h1 class="headerText">
    Welcome to New York City
      Click to be Disappointed
<div class="fillViewport blue">
	<h1>more text</h1>


                @import url('');

body {

.yellow {

.blue {

/* css from Sarah Drasner's Hero Generator */

.yellow {

.fillViewport {
	display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  width: 100%;
  height: 100vh; /* if you don't want it to take up the full screen, reduce this number */
  overflow: hidden;

.masthead {
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 37%, rgba(0,0,0,0.65) 100%), url( no-repeat center top scroll;
	background-size: cover;

h1 {
	font-family: 'Barlow Semi Condensed', sans-serif;
  font-style: normal;
  font-weight: bold;
  color: #eee;
  font-size: 11vmin;
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 40px;
button {
  background: #DD2C00;
  transition: background ease .25s;
  border-radius: 5px;
  display: inline-block;
  border: none;
  padding: 0.75rem 1.5rem;
  margin: 0;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: none;
button:hover {
  background: #63b6b8
button:focus {
  outline: 1px solid #fff;
  outline-offset: -4px;



                let split = new SplitText(".headerText")

let tl = gsap.timeline({scrollTrigger:{
	start:"top 50%",
	end:"bottom top",
	toggleActions:"restart none none reset"
.from(split.chars, {yPercent:-100,  stagger:0.05, duration:0.3, ease:"back"})
.from(split.chars, {opacity:0, stagger:0.05, duration:0.2}, 0)
.from("button", {y:100, opacity:0, ease:"back", duration:1}, "<1")

//need help learning GSAP? 
//check out my courses: