Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <html>

<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.1.2/tailwind.min.css" integrity="sha512-RntatPOhEcQEA81gC/esYoCkGkL7AYV7TeTPoU+R9zE44/yWxVvLIBfBSaMu78rhoDd73ZeRHXRJN5+aPEK53Q==" crossorigin="anonymous" />
  <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
</head>

<body>
  <div class="flex h-screen relative overflow-hidden">

    <div id="leftPane" class=" w-1/2 bg-black text-white text-center relative">
      <div class="absolute flex items-center h-screen right-0 w-48">
        <div id="leftPaneButton" class="w-full h-48  flex items-center cursor-pointer transition duration-500 hover:bg-gray-300 bg-white text-black flex justify-center items-center">links</div>
      </div>
      <div class="flex  items-center justify-center  p-48  h-screen">
        LOREM IPSUM DOLOR
      </div>
    </div>
    <div id="rightPane" class=" w-1/2 bg-white text-black text-center relative ">
      <div class="absolute flex items-center h-screen left-0 w-48">
        <div id="rightPaneButton" class="w-full h-48  flex items-center cursor-pointer transition duration-500 hover:bg-gray-700 bg-black text-white flex justify-center items-center">rechts</div>
      </div>
      <div class="flex items-center justify-center  p-48 text-center h-screen">
        LOREM IPSUM DOLOR
      </div>
    </div>
  </div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                $(document).ready(function () {
  $("#leftPaneButton").click(function () {
    $("#leftPane").animate({ width: 0 }, 1000);
    $("#rightPane").animate({ width: "100%" }, 1000);
  });

  $("#rightPaneButton").click(function () {
    $("#leftPane").animate({ width: "100%" }, 1000);
    $("#rightPane").animate({ width: 0 }, 1000);
  });
});

              
            
!
999px

Console