Pen Settings



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


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.


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.


                <!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>linear-gradient Demo</title>
  <div id="contents">
  <div id="paywall"></div>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus eu tincidunt est, vel egestas leo. Vestibulum tempor, lorem ac placerat fringilla, tortor sapien bibendum metus, vel posuere lorem augue quis urna. Praesent a pretium tortor. Praesent dapibus libero sed est bibendum congue. Phasellus augue nibh, pulvinar sit amet augue ut, laoreet eleifend ante. In sit amet augue dolor. Nulla ac pretium ipsum. Vestibulum aliquam tempus enim a vehicula. Duis purus metus, pellentesque eu gravida sed, gravida fermentum mi. Ut tincidunt sem ut diam euismod, at vulputate massa luctus. Nullam auctor at erat in aliquet. Morbi lorem magna, placerat at sagittis sed, blandit sit amet neque. Pellentesque placerat scelerisque enim ac tempus. Vestibulum sit amet libero placerat, rhoncus turpis et, accumsan massa. Duis pulvinar dolor vel erat imperdiet, bibendum ultrices lorem commodo.

Quisque vulputate placerat odio. Morbi eu consectetur ipsum. Cras egestas, justo ac ornare placerat, enim odio vehicula est, at volutpat orci nisi a sapien. Sed quis maximus erat, ut auctor mauris. Sed laoreet ullamcorper libero vitae tincidunt. Aenean malesuada orci in metus vehicula pellentesque a ac nibh. Fusce euismod, ipsum in hendrerit aliquam, massa justo elementum augue, sed pulvinar purus nulla in orci. Maecenas ipsum ipsum, posuere in tempus sed, ornare id ex. Maecenas quis dolor rhoncus, lacinia mauris vitae, sodales lacus.

Mauris ac dictum magna, eu viverra risus. Curabitur malesuada pellentesque tristique. Etiam pharetra nunc eu diam convallis, in imperdiet dolor ultricies. Duis tincidunt auctor est. Aenean sit amet felis eu velit fermentum rutrum. Sed non volutpat turpis. Curabitur tristique neque id scelerisque suscipit. Mauris bibendum eget ipsum quis feugiat. Integer et est ex.

Proin justo enim, commodo nec est a, blandit elementum ligula. Curabitur nunc dui, posuere vel sagittis a, blandit in eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam dui nibh, feugiat quis aliquam eget, dictum eu lectus. Mauris at ex ut elit venenatis porttitor. Maecenas feugiat sapien eget accumsan efficitur. Curabitur blandit fringilla urna, vel vestibulum elit congue nec. Donec mattis orci hendrerit est cursus, eu vehicula nunc scelerisque. Nulla egestas dui eget justo elementum, nec malesuada eros aliquam. Nam sed nulla ipsum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;

Integer feugiat, orci nec finibus lacinia, ex ex auctor sem, non vestibulum urna urna placerat tortor. Vivamus ex lectus, laoreet ut vestibulum et, eleifend a est. Sed sit amet diam et purus volutpat pharetra. Vivamus nec nibh at odio elementum eleifend in sit amet lectus. Phasellus erat enim, sollicitudin id blandit in, pulvinar condimentum leo. Fusce euismod sem aliquam efficitur porttitor. Quisque sit amet nisl bibendum, viverra sem ac, congue eros.


                #contents {
  position: relative;
  width: 80%;
  border: 1px solid #ddd;

#contents #paywall {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 1));

#contents p {
  white-space: pre-wrap;
  padding: 10px;