Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <p>These are all the same hexagon SVG</p>

<svg class="hexagon-fill large" viewBox="0 0 223 256" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" version="1.1"> <g><clipPath id="hex-mask"> <path d="M109.265882,0.866373104 L1.49975033,63.0989876 C0.571687798,63.6349237 1.201023e-15,64.6252259 0,65.6969197 L0,190.163325 C-2.08920141e-15,191.235018 0.571687798,192.225321 1.49975033,192.761257 L109.265882,254.993871 C110.194222,255.529968 111.338076,255.529961 112.266411,254.993854 L220.029691,192.761262 C220.957737,192.225322 221.529412,191.235029 221.529412,190.163347 L221.529412,65.6968971 C221.529412,64.6252154 220.957737,63.6349225 220.029691,63.098982 L112.266411,0.866390058 C111.338076,0.330282905 110.194222,0.330276441 109.265882,0.866373104 Z" id="path-1"></path></clipPath> </g><path clip-path="url(#hex-mask)" d="M109.265882,0.866373104 L1.49975033,63.0989876 C0.571687798,63.6349237 1.201023e-15,64.6252259 0,65.6969197 L0,190.163325 C-2.08920141e-15,191.235018 0.571687798,192.225321 1.49975033,192.761257 L109.265882,254.993871 C110.194222,255.529968 111.338076,255.529961 112.266411,254.993854 L220.029691,192.761262 C220.957737,192.225322 221.529412,191.235029 221.529412,190.163347 L221.529412,65.6968971 C221.529412,64.6252154 220.957737,63.6349225 220.029691,63.098982 L112.266411,0.866390058 C111.338076,0.330282905 110.194222,0.330276441 109.265882,0.866373104 Z" id="path-1"></path></svg>

<svg class="hexagon-fill small" viewBox="0 0 223 256" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" version="1.1"> <g><clipPath id="hex-mask"> <path d="M109.265882,0.866373104 L1.49975033,63.0989876 C0.571687798,63.6349237 1.201023e-15,64.6252259 0,65.6969197 L0,190.163325 C-2.08920141e-15,191.235018 0.571687798,192.225321 1.49975033,192.761257 L109.265882,254.993871 C110.194222,255.529968 111.338076,255.529961 112.266411,254.993854 L220.029691,192.761262 C220.957737,192.225322 221.529412,191.235029 221.529412,190.163347 L221.529412,65.6968971 C221.529412,64.6252154 220.957737,63.6349225 220.029691,63.098982 L112.266411,0.866390058 C111.338076,0.330282905 110.194222,0.330276441 109.265882,0.866373104 Z" id="path-1"></path></clipPath> </g><path clip-path="url(#hex-mask)" d="M109.265882,0.866373104 L1.49975033,63.0989876 C0.571687798,63.6349237 1.201023e-15,64.6252259 0,65.6969197 L0,190.163325 C-2.08920141e-15,191.235018 0.571687798,192.225321 1.49975033,192.761257 L109.265882,254.993871 C110.194222,255.529968 111.338076,255.529961 112.266411,254.993854 L220.029691,192.761262 C220.957737,192.225322 221.529412,191.235029 221.529412,190.163347 L221.529412,65.6968971 C221.529412,64.6252154 220.957737,63.6349225 220.029691,63.098982 L112.266411,0.866390058 C111.338076,0.330282905 110.194222,0.330276441 109.265882,0.866373104 Z" id="path-1"></path></svg>

<svg class="hexagon-fill outline" viewBox="0 0 223 256" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" version="1.1"> <g><clipPath id="hex-mask"> <path d="M109.265882,0.866373104 L1.49975033,63.0989876 C0.571687798,63.6349237 1.201023e-15,64.6252259 0,65.6969197 L0,190.163325 C-2.08920141e-15,191.235018 0.571687798,192.225321 1.49975033,192.761257 L109.265882,254.993871 C110.194222,255.529968 111.338076,255.529961 112.266411,254.993854 L220.029691,192.761262 C220.957737,192.225322 221.529412,191.235029 221.529412,190.163347 L221.529412,65.6968971 C221.529412,64.6252154 220.957737,63.6349225 220.029691,63.098982 L112.266411,0.866390058 C111.338076,0.330282905 110.194222,0.330276441 109.265882,0.866373104 Z" id="path-1"></path></clipPath> </g><path clip-path="url(#hex-mask)" d="M109.265882,0.866373104 L1.49975033,63.0989876 C0.571687798,63.6349237 1.201023e-15,64.6252259 0,65.6969197 L0,190.163325 C-2.08920141e-15,191.235018 0.571687798,192.225321 1.49975033,192.761257 L109.265882,254.993871 C110.194222,255.529968 111.338076,255.529961 112.266411,254.993854 L220.029691,192.761262 C220.957737,192.225322 221.529412,191.235029 221.529412,190.163347 L221.529412,65.6968971 C221.529412,64.6252154 220.957737,63.6349225 220.029691,63.098982 L112.266411,0.866390058 C111.338076,0.330282905 110.194222,0.330276441 109.265882,0.866373104 Z" id="path-1"></path></svg>
              
            
!

CSS

              
                body {
  color: red;
  font-size: 20px;
  padding: 20px;
  text-align: center;
}

svg {
  display: inline-block;
  margin: 0 50px 20px;
  vertical-align: middle;
}

.large {
  fill: #19195A;
  width: 200px;
}

.small {
  animation: antiClockwiseSpin 10s infinite linear;
  fill: #F1C232;
  width: 100px;
}

.outline {
  fill: none;
  stroke: #5E5E8B;
  stroke-width: 80px;
  width: 50px;
}

@keyframes antiClockwiseSpin {
	0%  {transform: rotate(360deg);}
	100% {transform: rotate(0deg);}	
}

@keyframes clockwiseSpin {
	0%  {transform: rotate(-360deg);}
	100% {transform: rotate(0deg);}	
}
              
            
!

JS

              
                
              
            
!
999px

Console