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.


                <h1>clip-path figure example</h1>
<div class="control">
  <label><input type="radio" name="path" value="none" checked> none</label>
  <label><input type="radio" name="path" value="circle"> circle</label>
  <label><input type="radio" name="path" value="ellipse"> ellipse</label>
  <label><input type="radio" name="path" value="polygon"> polygon</label>
  <label><input type="radio" name="path" value="path"> path</label>
  <label><input type="radio" name="path" value="inset"> inset</label>
  <label><input type="radio" name="path" value="svg"> svg</label>
<div class="picHolder"><img src="" alt="Nature" id="pic"></div>
  <clipPath id="clipping">
  <circle cx="190" cy="190" r="150" />
  <rect x="150" y="150" width="350" height="300" />


                body {
  font-family: sans-serif;
  text-align: center;
  margin: 20px 10%;
.control {
  border: 2px solid #ccc;
  border-radius: 8px;
  margin: 0 auto 20px;
  max-width: 500px;
  padding: 10px;
.picHolder {
  border: 4px solid #33a;
  width: 600px;
  margin: auto;
#pic {
  display: block;
.circle {
  clip-path: circle(40%);
.ellipse {
  clip-path: ellipse(230px 170px at 50% 30%);
.polygon {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
.path {
  clip-path: path('M315.5 37C254.7 -17.8 168.5 -16 148 86.9999C127.5 190 40.0001 95.0001 7.50002 185C-25 275 64.5 338.5 113.5 338.5C162.5 338.5 205 269 264 376C284.217 412.665 381.5 373.5 395.5 296C409.5 218.5 315.5 231.5 306.5 185C297.5 138.5 391.5 105.5 315.5 37Z');
.inset {
  clip-path: inset(100px 50px);
.svg {
  clip-path: url(#clipping);
.none {
  clip-path: none;


                let radio = document.getElementsByName('path');
for(let one of radio){
  one.addEventListener('click', function(){
    pic.className = this.value;