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.


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.


                <svg xmlns="" viewBox="0 -10 100 120" width="213" class="image">
  <title>This is an image title</title>
  <desc>This is an image description</desc>
    <clipPath id="maskImage" clipPathUnits="userSpaceOnUse">
      <path d="M100 63A50 50 0 110 70C0 42 20 0 48 0c27 0 52 42 52 70z" />
    <clipPath id="maskBackground" clipPathUnits="userSpaceOnUse">
      <path d="M190 101a50 50 0 01-50 50 50 50 0 01-50-50 50 50 0 0150-50 50 50 0 0150 50z" />
  <!-- Background image -->
  <g clip-path="url(#maskImage)" transform="translate(0 -7)">
    <image clip-path="url(#maskBackground)" width="120" height="120" x="70" y="38" href="" transform="translate(-90 -31)" />
  <!-- Foreground image -->
    <image width="120" height="144" x="-15" y="0" fill="none" class="image__foreground" href="" />


                /* Required styles */

.image {
  transform: scale(0.9, 0.9);
  transition: transform 0.2s ease-in;

.image__foreground {
  transform-origin: 50% 50%;
  transform: translateY(4px) scale(1, 1);
  transition: transform 0.2s ease-in;

.image:hover {
  transform: scale(1, 1);

.image:hover .image__foreground {
  transform: translateY(-7px) scale(1.05, 1.05);

/* Optional styles (decoration) */

body {
  padding: 2em;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 300px; /* Change this to any px value */
  margin: 0 auto;
  min-height: calc(100vh - 100px);

html {
  box-sizing: border-box;

*, *:before, *:after {
  box-sizing: inherit;


                // Credit goes to original idea that uses clip-path:path() which is not fully supported and is not responsive. I wanted to recreate the effect and make it responsive and use fully-supported features.