Pen Settings



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


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.


                <link rel="stylesheet" href=""> 

<div class="container">
<h4 class="title">
  <span class="lg-icon"><i class="fa fa-picture-o" aria-hidden="true"></i></span> <br />
  SVG Mask on SVG element</h4>

<!-- SVG markup for the mask -->
<svg class="svg-mask">
 		<mask id="mask1" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
    <linearGradient id="grad" gradientUnits="objectBoundingBox" x2="0" y2="1">
      <stop stop-color="white" offset="0"/>
      <stop stop-color="green" stop-opacity="0" offset="1"/>
    <circle cx="0.50" cy="0.50" r="0.50" id="circle" fill="url(#grad)"/>

<!-- SVG markup for the masked image -->
<svg class="masked-element" width="300" height="300" viewBox="0 0 300 300">
	<image xlink:href="" width="300px" height="300px" />
<div class="container">
  <h3>This is a SVG Mask on a SVG Element. Currently works in Webkit, Firefox, IE</h3>



                html {
  box-sizing: border-box;

*:after {
  box-sizing: inherit;

.lg-icon {
  font-size: 5rem;

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  background-color: green;
  color: white;
  text-align: center;

.container {
  max-width: 90%;
  margin: 0 auto;
  text-align: center;

.svg-mask {
  position: absolute;
  width: 0;
  height: 0;

.masked-element {
  position: relative;
  display: block;
  margin: 0 auto 20px;

.masked-element image {
  mask: url(#mask1);

.title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  text-align: center;