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.




                @import url("");

body {
  width: 100vw;
  min-height: 100vh;
  counter-reset: section;
  font-family: "Exo", Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  padding: 10px;
  box-sizing: border-box;

.item {
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  height: 10em;
  position: relative;

.item::before {
  counter-increment: section;
  content: counter(section);
  background-image: radial-gradient(
      50% 105%,
      #fffff5 15%,
      #fff3d5 31%,
      #ffd484 100%
    radial-gradient(51% 200%, #fffcf5 100%, rgba(251, 213, 142, 0) 100%),
    radial-gradient(50% 103%, #ff5f49 15%, #ff1919 100%);
  background-origin: border-box;
  background-clip: padding-box, padding-box, border-box;
  border: 2px solid transparent;
  box-shadow: 0 2px 10px 0 rgba(96, 43, 43, 0.5);
  border-radius: 50%;
  padding: 10px;
  font-size: 2em;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: #fff;
  text-shadow: 1px 0px 0 rgb(103 105 171), 0px 1px 0 rgb(221 17 17),
    -1px 0px 0 rgb(113 12 206), 0px -1px 0 rgb(207 107 225),
    2px 0px 0 rgb(103 105 171), 0px 2px 0 rgb(221 17 17),
    -2px 0px 0 rgb(113 12 206), 0px -2px 0 rgb(207 107 225);
  width: 48px;
  height: 48px;
  mix-blend-mode: difference;
  filter: hue-rotate(180deg);
  backdrop-filter: saturate(0.8);

.item:nth-child(2n) {
  height: 14em;
.item:nth-child(3n) {
  height: 18em;
.item:nth-child(4n) {
  height: 22em;
.item:nth-child(5n) {
  height: 24em;
.item:nth-child(6n) {
  height: 30em;
.item:nth-child(7n) {
  height: 34em;

.item:nth-child(8n) {
  height: 40em;

body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: masonry;
  gap: 10px;



                for (let i = 0; i <= 50; i++) {
  const div = document.createElement("div");
  div.classList.add("item"); = `url(${i})`;