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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <input type="range" min="150" max="400" value="300"> 
<div>
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='150' cy='150' r='135' stroke='%23003300' stroke%2Dwidth='4' fill='%236ab150'/%3E%3C/svg%3E"  alt="test shape-outside + SVG">

<p>En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga antigua, rocín flaco y galgo corredor. Una olla de algo más vaca que carnero, salpicón las más noches, duelos y quebrantos los sábados, lentejas los viernes, algún palomino de añadidura los domingos, consumían las tres partes de su hacienda. El resto della concluían sayo de velarte, calzas de velludo para las fiestas con sus pantuflos de lo mismo, los días de entre semana se honraba con su vellori de lo más fino. Tenía en su casa una ama que pasaba de los cuarenta, y una sobrina que no llegaba a los veinte, y un mozo de campo y plaza, que así ensillaba el rocín como tomaba la podadera. Frisaba la edad de nuestro hidalgo con los cincuenta años, era de complexión recia, seco de carnes, enjuto de rostro; gran madrugador y amigo de la caza. </p>
</div>


            
          
!
            
                div{width:40em;
  margin:1em auto;
  padding:1em;
  border:1px solid #d9d9d9;
  font-family:Verdana, Geneva, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;  
}
img{
  width:300px;
  height:300px;
  float:left;
  shape-margin:.5em;
  /*shape-outside:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='150' cy='150' r='135' stroke='%23003300' stroke%2Dwidth='4' fill='%236ab150'/%3E%3C/svg%3E");*/
}
input{ width:40em; margin: 2em auto; display:block;}

            
          
!
            
              var svgimg = document.querySelector("img");
var inputtr = document.querySelector("input");
onInputFunc();
inputtr.addEventListener("input", onInputFunc, false);

function onInputFunc(){
  var val = inputtr.value;
  var center = val/2;
  var radius = .9*val/2;
  var src = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='"+center+"' cy='"+center+"' r='"+radius+"' stroke='%23003300' stroke%2Dwidth='4' fill='%236ab150'/%3E%3C/svg%3E"
  
  svgimg.src = src;
  svgimg.style.width = svgimg.style.height = val + "px";
  svgimg.style.webkitShapeOutside = 'url("'+src+'")';
  svgimg.style.shapeOutside = 'url("'+src+'")';
}


            
          
!
999px

Console