Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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

              
                <a href="#">
  <div class="card">
    <h2>Link-Wrapped Card</h2>
    <div class="card__icon">
      <svg viewBox="0 0 100 100">
        <g transform="translate(0,-952.36218)">
          <path style="text-indent:0;text-transform:none;direction:ltr;block-progression:tb;baseline-shift:baseline;color:#000000;enable-background:accumulate;" d="m 20,984.36256 c -9.9374,0 -18,8.06262 -18,18.00004 0,9.9374 8.0626,18 18,18 l 19,0 a 2.0002,2.0002 0 1 0 0,-4 l -19,0 c -7.7906,0 -13.9999999,-6.2094 -13.9999999,-14 0,-7.79062 6.2093999,-14.00004 13.9999999,-14.00004 l 21,0 c 7.7906,0 14,6.20942 14,14.00004 a 2.0002,2.0002 0 1 0 4,0 c 0,-9.93742 -8.0626,-18.00004 -18,-18.00004 l -21,0 z m 40.875,0 a 2.0009763,2.0009763 0 1 0 0.125,4 l 19,0 c 7.7906,0 14,6.20942 14,14.00004 0,7.7906 -6.2094,14 -14,14 l -21,0 c -7.7906,0 -14,-6.2094 -14,-14 a 2.0002,2.0002 0 1 0 -4,0 c 0,9.9374 8.0626,18 18,18 l 21,0 c 9.9374,0 18,-8.0626 18,-18 0,-9.93742 -8.0626,-18.00004 -18,-18.00004 l -19,0 a 2.0002,2.0002 0 0 0 -0.125,0 z" fill-opacity="1" stroke="none" marker="none" visibility="visible" display="inline" overflow="visible"></path>
        </g>
      </svg>
    </div>
    <p>Eveything in this link effectively becomes a link as well.</p>
  </div>
</a>

<div class="card">
  <h2>
    <a href="#0">Card with Cover Link</a>
  </h2>
  <div class="card__icon">
    <svg viewBox="0 0 100 100">
      <g transform="translate(0,-952.36218)">
        <path style="text-indent:0;text-transform:none;direction:ltr;block-progression:tb;baseline-shift:baseline;color:#000000;enable-background:accumulate;" d="m 20,984.36256 c -9.9374,0 -18,8.06262 -18,18.00004 0,9.9374 8.0626,18 18,18 l 19,0 a 2.0002,2.0002 0 1 0 0,-4 l -19,0 c -7.7906,0 -13.9999999,-6.2094 -13.9999999,-14 0,-7.79062 6.2093999,-14.00004 13.9999999,-14.00004 l 21,0 c 7.7906,0 14,6.20942 14,14.00004 a 2.0002,2.0002 0 1 0 4,0 c 0,-9.93742 -8.0626,-18.00004 -18,-18.00004 l -21,0 z m 40.875,0 a 2.0009763,2.0009763 0 1 0 0.125,4 l 19,0 c 7.7906,0 14,6.20942 14,14.00004 0,7.7906 -6.2094,14 -14,14 l -21,0 c -7.7906,0 -14,-6.2094 -14,-14 a 2.0002,2.0002 0 1 0 -4,0 c 0,9.9374 8.0626,18 18,18 l 21,0 c 9.9374,0 18,-8.0626 18,-18 0,-9.93742 -8.0626,-18.00004 -18,-18.00004 l -19,0 a 2.0002,2.0002 0 0 0 -0.125,0 z" fill-opacity="1" stroke="none" marker="none" visibility="visible" display="inline" overflow="visible"></path>
      </g>
    </svg>
  </div>
  <p>Eveything in this link effectively becomes a link as well.</p>
</div>

              
            
!

CSS

              
                body {
  display: flex;
  height: 100vh;
  align-items: center;
  margin: 0;
  justify-content: center;
}

.card {
  border: 1px solid #eaeaea;
  border-radius: 15px;
  box-shadow:
    0 2.8px 2.2px rgba(0, 0, 0, 0.034),
    0 6.7px 5.3px rgba(0, 0, 0, 0.048),
    0 12.5px 10px rgba(0, 0, 0, 0.06),
    0 22.3px 17.9px rgba(0, 0, 0, 0.072),
    0 41.8px 33.4px rgba(0, 0, 0, 0.086),
    0 100px 80px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  width: 200px;
  margin: 1rem;
  position: relative;
}

.card__icon {
  align-self: center;
  fill: blue;
  order: 1;
  width: 100px;
}

.card h2 {
  order: 2;
}
.card h2 a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


.card p {
  order: 3;
}
              
            
!

JS

              
                
              
            
!
999px

Console