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>Main title</h1>
  <p>Dragée powder bear claw tiramisu pudding gummi bears wafer. Macaroon chocolate cake cake marzipan icing carrot cake macaroon sweet. Lemon drops </p>
</section>
<section>
  <h2>Second title</h2>
  <p class="slant">Pie pastry macaroon candy tootsie roll jujubes pudding pie. Jelly-o chocolate cake pastry gingerbread brownie danish liquorice chocolate cake. Jelly beans donut cupcake danish croissant liquorice. Cotton candy brownie croissant pie toffee. Cotton candy chocolate cake gummi bears ice cream jelly fruitcake caramels. Shortbread ice cream bear claw gingerbread chocolate cake jelly-o cake caramels soufflé.</p>
</section>
<section>
  <h3>small title</h3>
  <p>Pie pastry macaroon candy tootsie roll jujubes pudding pie. gingerbread brownie danish liquorice chocolate cake. Jelly beans donut cupcake danish croissant liquorice.</p>
</section>
<section >
  <h2>Third title</h2>
  <p class="slant alt">Pie pastry macaroon candy tootsie roll jujubes pudding pie. Jelly-o chocolate cake pastry gingerbread brownie danish liquorice chocolate cake. Jelly beans donut cupcake danish croissant liquorice. Cotton candy brownie croissant pie toffee. Cotton candy chocolate cake gummi bears ice cream jelly fruitcake caramels. Shortbread ice cream bear claw gingerbread chocolate cake jelly-o cake caramels soufflé.</p>
</section>
<section>
  <h3>another title</h3>
  <p>Pie pastry macaroon candy tootsie roll jujubes pudding pie.</p>
</section>
              
            
!

CSS

              
                .slant {
  --a: 3deg; /* control the angle (yes it should be small) */
  --c: pink;
  
  border-image: conic-gradient(var(--c) 0 0) fill 0//9999px;
  clip-path: 
    polygon(
      -9999px calc(tan(var(--a))*9999px),
      9999px calc(tan(var(--a))*-9999px),
      calc(100% + 9999px) calc(100% - tan(var(--a))*9999px),
      calc(100% - 9999px) calc(100% + tan(var(--a))*9999px)
    );
}
.slant.alt {
  --c: lightblue;
  clip-path: 
    polygon(
      -9999px calc(100% - tan(var(--a))*9999px),
       9999px calc(100% + tan(var(--a))*9999px),
      calc(100% + 9999px) calc(tan(var(--a))*9999px),
      calc(100% - 9999px) calc(tan(var(--a))*-9999px)
    );
}

/* the below is a fix specific to my case to avoid the overlap with the title
  you may need to consider something else in your real case but sill using z-index
*/
.slant {
  position: relative;
  z-index: -1;
}


section {
  /* center + max-width:800px + min-margin: 10px */
  margin: 50px max(10px, 50% - 800px/2);
}
body {
  font-family: system-ui, sans-serif;
  background: #eee;
}
h1 {
  font-size: 3rem;
}
p {
  font-size: 1.5rem;
  text-align:justify;
}
              
            
!

JS

              
                
              
            
!
999px

Console