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. 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

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

              
                <div class="flex items-center justify-center w-full h-full min-h-screen">
  <div class="w-full h-full max-w-3xl">
    <div class="ta-youtube ta-youtube--perspective border bg-gray-800 rounded-lg shadow-xl overflow-hidden max-w-3xl" style="max-height: 200px" x-data="taYoutube()" x-init="init()" data-id="nAULsoAQn2g" data-remember="false" data-autoplay="false" data-start_at="200" data-end_at="220">
      <button href="play" class="absolute inset-0 w-full h-full flex items-center justify-center cursor-pointer" x-on:click.prevent="show()" x-show="!active">
        <!--  Background image -->
        <img class="ta-youtube-background ta-youtube-anim ta-youtube-anim-kenburns" src="https://picsum.photos/id/237/600/400" alt="Background Image" title="Background Image" />
        <!--  Darkening gradient -->
        <div class="ta-youtube-gradient ta-youtube-gradient-dark"></div>
        <!--  Play button -->
        <div class="ta-youtube-button flex items-center justify-center text-white transform duration-200 hover:scale-110" x-ref="button" alt="Show youtube video">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="fill-current w-full">
            <title>play-circle</title>
            <path d="M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8.0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-2e2 2e2-2e2s2e2 89.5 2e2 2e2-89.5 2e2-2e2 2e2S56 366.5 56 256z"></path>
          </svg>
        </div>
        <!--  Title wrapper -->
        <div class="ta-youtube-title text-white text-5xl leading-tight font-medium px-2 sm:px-8">
          // Title
        </div>
        <!--  Description wrapper -->
        <div class="ta-youtube-description text-white font-semibold text-xl text-center px-2 sm:px-8">
          // Description
        </div>
      </button>
      <!--  YouTube player -->
      <template x-if="active">
        <iframe class="absolute inset-0 w-full h-full" :src="url" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
      </template>
    </div>
  </div>
</div>
              
            
!

CSS

              
                .font-sans {
  font-family: "Raleway", sans-serif;
}

html,
body {
  font-size: 13px;
}

@media only screen and (min-width: 640px) {
  html,
  body {
    font-size: 14px;
  }
}

@media only screen and (min-width: 768px) {
  html,
  body {
    font-size: 15px;
  }
}

@media only screen and (min-width: 1024px) {
  html,
  body {
    font-size: 16px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console