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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <article>
  <h1><code>shape-outside</code> examples</h1>
  <img src="https://upload.wikimedia.org/wikipedia/commons/3/34/Red_star.svg" alt="" class="star" />
  <p>
    Lorem Ipsum is simply dummy text of the printing and typesetting
    industry. Lorem Ipsum has been the industry's standard dummy text ever
    since the 1500s, when an unknown printer took a galley of type and
    scrambled it to make a type specimen book. It has survived not only five
    centuries, but also the leap into electronic typesetting, remaining
    essentially unchanged. It was popularised in the 1960s with the release
    of Letraset sheets containing Lorem Ipsum passages, and more recently
    with desktop publishing software like Aldus PageMaker including versions
    of Lorem Ipsum.It is a long established fact that a reader will be
    distracted by the readable content of a page when looking at its layout.
    The point of using Lorem Ipsum is that it has a more-or-less normal
    distribution of letters, as opposed to using 'Content here, content
    here', making it look like readable English. Many desktop publishing
    packages and web page editors now use.
  </p>
  <div class="circle"></div>
  <p>
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Consequatur,
    iure suscipit! Error vero, ab laudantium ullam unde sit ad consequuntur
    assumenda qui quis beatae neque dicta facilis explicabo minima. Libero. Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eaque iste fuga ipsa autem iure, molestias totam ipsam. Sapiente ad adipisci, iste ipsam illo, quasi perferendis consequuntur vero saepe pariatur sed! Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptate optio modi voluptatibus labore, et a? Praesentium quam perferendis harum. Tempora quam adipisci illum ipsum accusamus ut iste voluptatem illo provident.
  </p>
</article>
              
            
!

CSS

              
                article {
  max-width: 800px;
  margin: 0 auto;
}

p {
  line-height: 1.6;
  font-family: Helvetica, serif;
  font-size: 14px;
}

 /* chrome has issue with using float:inline-start and shape-outside */
.star {
  float: left;
  width: 250px;
  shape-outside: url(https://upload.wikimedia.org/wikipedia/commons/3/34/Red_star.svg);
  shape-margin: 20px;
}

.circle {
  border-radius: 50%;
  height: 200px;
  width: 200px;
  background-color: grey;
  float: right;
  shape-outside: circle();
}

h1 code {
  font-size: 120%;
}

              
            
!

JS

              
                
              
            
!
999px

Console