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

              
                <section>
  <h1>
    <span>Elaborate title</span>
  </h1>
</section>

<article>
  This is a <span class="tooltip-parent"><u>tooltip</u>
    <span class="tooltip">
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac vulputate augue, sed consequat velit. Praesent rhoncus viverra ullamcorper.
    </span>

  </span> that is in a hovered state for your convinience.

  <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac vulputate augue, sed consequat velit. Praesent rhoncus viverra ullamcorper.
  </p>
  
  <p>
    In eu erat commodo enim varius feugiat ac vitae arcu. Aenean id varius justo. Curabitur eget mollis nibh. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum eu sapien sed lorem imperdiet auctor sit amet in felis. Donec non sem vel turpis laoreet pretium vitae sit amet odio. In sit amet fermentum arcu. Ut fringilla risus ac venenatis euismod. Donec non eleifend purus. Suspendisse a aliquet tellus. Maecenas bibendum commodo augue et porta.
  </p>
</article>
              
            
!

CSS

              
                *,
*::before {
  box-content: content-box;
}

h1 {
  font-size: 64px;
  text-transform: uppercase;
  margin: 0;
  position: relative;
  display: inline-block;
  margin-bottom: 0.5em;
}

h1 span {
  position: relative;
  z-index: 2;
  padding: 0 0.25em;
}

h1::before {
  content: "";
  width: 100%;
  height: 20px;
  background-color: goldenrod;
  opacity: 0.6;
  z-index: 1;
  position: absolute;
  top: 60%;
  left: 0;
  transform: skew(-45deg, 0);
  transform-origin: 50% 50%;
}

body {
  padding: 3rem 2rem;
  width: 768px;
  margin: 0 auto;
  line-height: 1.5;
  color: #111111;
}

u {
  color: darkgoldenrod;
  font-weight: 600;
}

.tooltip-parent {
  position: relative;
  display: inline-block;
}

.tooltip {
  width: 300px;
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(0, calc(-100% - 16px), 0);
  background-color: #ffffff;
  padding: 0.5rem;
  border: 2px solid darkgoldenrod;
  border-radius: 4px;
}

.tooltip::before {
  content: "";
  width: 0; 
  height: 0; 
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top :12px solid darkgoldenrod;
  position: absolute;
  top: 100%;
  margin-top: 1px;
  left:12px;
  z-index: -1;
}

              
            
!

JS

              
                
              
            
!
999px

Console