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

              
                <h1>Basic SVG Support Tests</h1>

<h2>SVG as &lt;img></h2>

<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/test-svg.svg" alt="" />

<h2>SVG as background-image</h2>

<div class="svg-bg"></div>

<h2>Inline SVG</h2>

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<path d="M92.357,62.078c1.876-6.646,2.011-13.692,0.298-20.572c-1.714-6.88-5.139-13.04-9.911-18.028  c0.957-4.566-0.992-9.433-5.217-11.976c-4.225-2.537-9.438-1.974-13.021,1.016c-3.511-0.987-7.149-1.499-10.819-1.499  c-0.916,0-1.826,0.032-2.73,0.092c-0.256-0.12-0.606-0.284-1.058-0.495c-0.478-0.229-1.061-0.501-1.751-0.776  c-0.683-0.287-1.448-0.616-2.323-0.893c-0.854-0.32-1.816-0.576-2.833-0.836c-1.028-0.221-2.111-0.467-3.264-0.56  c-1.144-0.132-2.347-0.118-3.558-0.018c-0.605,0.043-1.211,0.179-1.816,0.279C33.761,7.991,33.147,8.1,32.577,8.35  c-1.172,0.404-2.25,1.035-3.249,1.711c-0.998,0.69-1.85,1.524-2.618,2.366c-1.5,1.725-2.571,3.564-3.317,5.203  c-0.755,1.639-1.2,3.075-1.482,4.085c-0.023,0.113-0.058,0.214-0.097,0.312c-3.166,0.509-6.095,2.353-7.875,5.316  c-1.65,2.746-1.986,5.91-1.205,8.774c-0.474,1.729-1.037,3.923-1.599,6.48c-0.363,1.615-0.718,3.373-1.063,5.239  c-0.322,1.871-0.643,3.847-0.884,5.907c-0.25,2.057-0.445,4.194-0.534,6.374c-0.106,2.179-0.087,4.402,0.042,6.623  c0.105,1.109,0.151,2.222,0.339,3.321l0.241,1.647c0.116,0.543,0.231,1.084,0.347,1.623c0.188,1.087,0.592,2.121,0.871,3.167  c0.196,0.509,0.391,1.014,0.585,1.516c0.188,0.504,0.388,0.999,0.651,1.465c0.245,0.474,0.488,0.942,0.729,1.407  c0.266,0.45,0.578,0.871,0.861,1.301c0.532,0.888,1.274,1.595,1.916,2.343c0.313,0.384,0.73,0.654,1.083,0.979  c0.372,0.304,0.719,0.631,1.096,0.9c0.797,0.476,1.534,1.009,2.309,1.38c0.791,0.335,1.539,0.697,2.273,0.962  c0.752,0.211,1.465,0.41,2.135,0.598c0.668,0.202,1.318,0.232,1.908,0.346c0.592,0.082,1.136,0.194,1.629,0.229  c0.262,0.01,0.507,0.02,0.738,0.029c0.428,0.353,0.876,0.688,1.366,0.981c4.226,2.541,9.441,1.978,13.025-1.011  c3.509,0.986,7.148,1.497,10.817,1.497c0.001,0,0.001,0,0.002,0c10.594,0,20.429-4.03,27.796-11.105  c4.561,0.946,9.417-1,11.953-5.219C95.904,70.87,95.343,65.66,92.357,62.078z M89.997,42.168c1.482,5.953,1.482,12.04,0.077,17.837  c-0.186-0.126-0.364-0.258-0.559-0.375l-6.441-3.873c-2.179-1.31-4.619-1.785-6.966-1.541c0.75-5.692-0.696-11.5-4.03-16.176  c2.187-0.885,4.12-2.45,5.43-4.626l3.874-6.44c0.117-0.194,0.213-0.395,0.317-0.594C85.659,30.839,88.515,36.215,89.997,42.168z   M31.663,56.696c0.701,2.816,1.921,5.412,3.559,7.703c-2.187,0.885-4.119,2.448-5.428,4.626l-3.872,6.442  c-0.117,0.195-0.214,0.396-0.318,0.595c-3.96-4.46-6.816-9.836-8.298-15.79S15.824,48.23,17.23,42.434  c0.185,0.127,0.364,0.259,0.559,0.376l6.439,3.871c2.178,1.309,4.619,1.784,6.965,1.541C30.821,51.015,30.961,53.88,31.663,56.696z   M13.584,57.249c0.049-0.412,0.112-0.807,0.168-1.211c0.201,1.636,0.491,3.271,0.896,4.896c1.713,6.881,5.138,13.041,9.911,18.029  c-0.244,1.165-0.298,2.348-0.173,3.509c-0.531-0.175-1.091-0.329-1.607-0.62c-0.639-0.324-1.34-0.597-1.943-1.066  c-0.314-0.213-0.634-0.43-0.957-0.648c-0.312-0.232-0.588-0.518-0.891-0.777c-0.627-0.499-1.129-1.146-1.671-1.773  c-0.291-0.298-0.482-0.68-0.726-1.023c-0.219-0.36-0.497-0.688-0.675-1.082c-0.386-0.769-0.794-1.537-1.069-2.378  c-0.646-1.639-1.018-3.414-1.287-5.197c-0.247-1.791-0.342-3.607-0.326-5.399c-0.003-0.895,0.06-1.785,0.094-2.663  C13.417,58.967,13.464,58.1,13.584,57.249z M45.262,65.173c-2.238-1.345-4.754-1.812-7.159-1.52  c-1.771-2.212-3.076-4.786-3.782-7.619c-0.706-2.832-0.76-5.719-0.233-8.504c2.262-0.87,4.266-2.462,5.611-4.7  c1.351-2.246,1.817-4.771,1.518-7.185c3.469-2.784,7.813-4.351,12.454-4.351c1.234,0,2.46,0.125,3.665,0.352  c0.869,2.266,2.464,4.272,4.706,5.62c2.232,1.344,4.743,1.812,7.145,1.521c3.612,4.525,5.084,10.435,4.018,16.124  c-2.257,0.871-4.256,2.462-5.6,4.696c-1.35,2.245-1.815,4.771-1.517,7.185c-3.47,2.785-7.814,4.352-12.456,4.352  c-1.234,0-2.46-0.124-3.666-0.353C49.097,68.526,47.502,66.521,45.262,65.173z M62.422,14.823c-0.121,0.178-0.249,0.351-0.361,0.538  L58.188,21.8c-1.308,2.175-1.783,4.612-1.54,6.957c-0.984-0.131-1.979-0.201-2.977-0.201c-4.782,0-9.389,1.545-13.189,4.257  c-0.883-2.195-2.451-4.136-4.636-5.449l-6.441-3.873c-0.195-0.117-0.396-0.214-0.596-0.318c6.741-6.007,15.486-9.413,24.877-9.413  C56.641,13.759,59.569,14.133,62.422,14.823z M27.491,20.667c0.08-0.316,0.168-0.645,0.283-0.994  c0.358-1.095,0.874-2.345,1.665-3.488c0.78-1.144,1.845-2.162,3.11-2.757c0.62-0.324,1.303-0.508,1.981-0.646  c0.689-0.106,1.382-0.158,2.065-0.117c0.68,0.019,1.345,0.133,1.973,0.242c0.583,0.126,1.132,0.25,1.643,0.412  C35.547,14.959,31.239,17.438,27.491,20.667z M24.298,18.05c0.733-1.564,1.761-3.325,3.222-4.89  c0.741-0.765,1.551-1.517,2.482-2.122c0.93-0.598,1.927-1.137,3.006-1.444c0.521-0.205,1.084-0.271,1.621-0.41  c0.554-0.062,1.1-0.163,1.652-0.175c1.102-0.049,2.192,0.025,3.233,0.209c1.043,0.155,2.038,0.431,2.966,0.719  c0.922,0.327,1.787,0.639,2.562,1.011c0.546,0.227,1.033,0.473,1.494,0.713c-0.66,0.117-1.313,0.253-1.963,0.402  c-0.166-0.067-0.359-0.146-0.607-0.247c-0.339-0.144-0.756-0.308-1.252-0.465c-0.49-0.167-1.04-0.361-1.668-0.513  c-0.614-0.183-1.307-0.315-2.041-0.448c-0.743-0.101-1.533-0.19-2.369-0.176c-0.831-0.008-1.704,0.093-2.577,0.278  c-0.868,0.215-1.746,0.507-2.542,0.969c-1.627,0.873-2.873,2.282-3.705,3.684c-0.847,1.414-1.325,2.844-1.643,4.071  c-0.28,1.163-0.446,2.143-0.468,2.872c-0.945-0.179-1.9-0.242-2.845-0.178C23.135,20.943,23.572,19.586,24.298,18.05z M24.5,87.703  c-0.619-0.165-1.277-0.34-1.971-0.524c-0.674-0.237-1.353-0.562-2.08-0.854c-0.709-0.329-1.373-0.809-2.105-1.226  c-0.344-0.241-0.658-0.536-0.998-0.807c-0.322-0.292-0.707-0.525-0.993-0.875c-0.586-0.679-1.275-1.305-1.771-2.12  c-0.264-0.394-0.557-0.774-0.808-1.188c-0.228-0.431-0.458-0.864-0.69-1.302c-0.251-0.428-0.443-0.892-0.625-1.365  c-0.188-0.47-0.377-0.943-0.567-1.42c-0.146-0.494-0.292-0.991-0.439-1.491c-0.161-0.496-0.285-1.006-0.381-1.526  c-0.108-0.517-0.217-1.036-0.326-1.556l-0.225-1.589c-0.177-1.057-0.216-2.141-0.314-3.214c-0.116-2.158-0.127-4.326-0.014-6.459  c0.096-2.133,0.296-4.23,0.55-6.254c0.246-2.023,0.57-3.971,0.895-5.813c0.35-1.838,0.701-3.574,1.074-5.165  c0.368-1.565,0.735-2.994,1.078-4.259c0.33,0.584,0.717,1.139,1.152,1.663c-0.052,0.171-0.107,0.351-0.166,0.542  c-0.461,1.586-1.07,3.86-1.649,6.623c-0.588,2.759-1.153,6.01-1.452,9.534c-0.147,1.761-0.226,3.591-0.207,5.453  c0.024,1.863,0.163,3.761,0.464,5.643c0.324,1.875,0.759,3.75,1.49,5.501c0.668,1.771,1.639,3.4,2.743,4.842  c0.595,0.69,1.153,1.395,1.842,1.946c0.333,0.286,0.641,0.596,0.983,0.851c0.355,0.24,0.705,0.478,1.051,0.712  c1.396,0.907,2.836,1.574,4.208,2.023c0.15,0.062,0.297,0.098,0.447,0.148c0.365,1.37,0.984,2.672,1.844,3.827  c-0.088-0.011-0.169-0.023-0.26-0.033C25.733,87.881,25.117,87.874,24.5,87.703z M53.615,88.681c-2.953,0-5.88-0.373-8.732-1.063  c0.121-0.177,0.248-0.348,0.359-0.534l3.873-6.443c1.308-2.176,1.782-4.614,1.539-6.958c0.984,0.131,1.979,0.2,2.978,0.2  c4.783,0,9.391-1.545,13.191-4.257c0.883,2.195,2.449,4.137,4.633,5.449l6.44,3.874c0.196,0.118,0.398,0.215,0.599,0.319  C71.754,85.275,63.008,88.682,53.615,88.681z"/>
</svg>
              
            
!

CSS

              
                .svg-bg {
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/test-svg.svg);
  width: 100px;
  height: 100px;
}

              
            
!

JS

              
                
              
            
!
999px

Console