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

+ 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="block b1">
    <div class="block b2">
    <div class="block b3">

    <script src=""></script>
    <script src=""></script>


                *, ::before, ::after{
    box-sizing: border-box;
    margin: 0;
    padding: 0;

body {
    background: #222;

.block {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
.block h2 {
    font-size: 50px;
    padding-bottom: 100px;
    color: white;
.b1 {
    background: #2980b9;
.b2 {
    background: #f1c40f;
.b2 h2{
    color: #222;
    visibility: hidden;
.b3 {
    background: #9b59b6;


                gsap.from('.b2 h2', {
  duration: 1.4,
  autoAlpha: 0,
  y: 150,
  scale: 0.3,
  scrollTrigger: {
    trigger: '.b2 h2',
    markers: true,
    // start: 'top bottom' //デフォルト値
    // start: 'top bottom-=200' //rootMargin -200pxと同じ
    // start: 'top 50%' //%を使う場合
    start: 'top center+=5%', //y軸50%からさらに5%プラス側に指定
    // end: 'bottom top' //デフォルト値
    end: 'bottom+=200 top' // 要素のbottomを下方向に200px