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

              
                <?xml version="1.0" encoding="utf-8"?>
<html>
  <body>
    <center>
      <p>May be you will remember this pattern of an old chair.</p>
      <img src="https://norbat.de/wp-content/uploads/2015/09/comb-pattern.jpg" width="8%"/>
      <p><em>That was my inspiration</em></p>
      <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="700" height="550px">


      <defs>
      <pattern id="Flechtwabe" width="150" height="150" patternUnits="userSpaceOnUse" patternTransform="scale(1)">
      <g>
        <rect fill="#BE0A26" width="20" height="29"/>
        <polygon fill="#BE0A26" points="0,49 20,49 20,81 0,61"/>
        <polygon fill="#BE0A26" points="0,89 20,109 20,150 0,150"/>
        <polygon fill="#E5352D" points="20,0 112,0 92,20 20,20"/>
        <polygon fill="#E5352D" points="150,0 150,20 118,20 138,0"/>
        <rect y="29" fill="#E5352D" width="30" height="20"/>
        <polygon fill="#E5352D" points="50,29 82,29 62,49 50,49 	"/>
        <polygon fill="#E5352D" points="90,49 110,29 150,29 150,49"/>
        <polygon fill="#BE0A26" points="30,20 50,20 50,111 30,91"/>
        <polygon fill="#BE0A26" points="30,119 50,139 50,150 30,150"/>
        <polygon fill="#A10D59" points="89,150 61,150 0,89 0,61"/>
        <polygon fill="#A10D59" points="139.341,49 150,60 150,88 111,49"/>
        <polygon fill="#A10D59" points="114,24 120,29 110,29	"/>
        <polygon fill="#A10D59" points="82,20 92,20 87,25"/>
        <polygon fill="#93117E" points="112,0 140,0 50,88 50,60"/>
        <polygon fill="#93117E" points="30,80 24,86 30,91"/>
        <polygon fill="#93117E" points="25,114 20,118 20,109"/>
        <polygon fill="#93117E" points="112,150 150,111 150,140 140,150"/>
      </g>
      </pattern>
      <pattern id="Flechtwabe50p" width="150" height="150" patternUnits="userSpaceOnUse" patternTransform="scale(0.5)">
      <g>
        <rect fill="#BE0A26" width="20" height="29"/>
        <polygon fill="#BE0A26" points="0,49 20,49 20,81 0,61"/>
        <polygon fill="#BE0A26" points="0,89 20,109 20,150 0,150"/>
        <polygon fill="#E5352D" points="20,0 112,0 92,20 20,20"/>
        <polygon fill="#E5352D" points="150,0 150,20 118,20 138,0"/>
        <rect y="29" fill="#E5352D" width="30" height="20"/>
        <polygon fill="#E5352D" points="50,29 82,29 62,49 50,49 	"/>
        <polygon fill="#E5352D" points="90,49 110,29 150,29 150,49"/>
        <polygon fill="#BE0A26" points="30,20 50,20 50,111 30,91"/>
        <polygon fill="#BE0A26" points="30,119 50,139 50,150 30,150"/>
        <polygon fill="#A10D59" points="89,150 61,150 0,89 0,61"/>
        <polygon fill="#A10D59" points="139.341,49 150,60 150,88 111,49"/>
        <polygon fill="#A10D59" points="114,24 120,29 110,29	"/>
        <polygon fill="#A10D59" points="82,20 92,20 87,25"/>
        <polygon fill="#93117E" points="112,0 140,0 50,88 50,60"/>
        <polygon fill="#93117E" points="30,80 24,86 30,91"/>
        <polygon fill="#93117E" points="25,114 20,118 20,109"/>
        <polygon fill="#93117E" points="112,150 150,111 150,140 140,150"/>
      </g>
      </pattern>
      </defs>
      <rect x="0" y="0" width="150" height="150" fill="url(#Flechtwabe)"></rect> 
      <rect x="0" y="200" width="300" height="300" fill="url(#Flechtwabe50p)"></rect>
      <rect x="400" y="200" width="300" height="300" fill="url(#Flechtwabe)" opacity="1">
        <animate id="animation1"
             attributeName="fill-opacity"
             from="0.1" to="1" dur="5s"
             begin="0s;animation2.end" />
    <animate id="animation2"
             attributeName="fill-opacity"
             from="1" to="0.1" dur="1s" 
             begin="animation1.end+10s" />
        </rect>
      <rect x="450" y="300" width="150" height="150" fill="url(#Flechtwabe)"></rect> 
        <text class="description" x="220" y="100" fill="red">COMB PATTERN</text>
      </svg>      
    </center>
  </body>
</html>
              
            
!

CSS

              
                body{
  background-color:#95a5a6;
}
h1{
  color:#CCC;
  font-family: sans-serif;
  font-weight: 200;
  text-align: center;
}
h2{
  font-size: 1.8em;
}
p{
  color:#3c3e50;
  font-family: sans-serif;
  font-weight: 100;
  text-align: center;
  font-size: 1.2em;
  line-height: 1.3em;
}
.mystr{
  stroke:#f1c40f;
}
.myf{
  fill:#f1c40f;
}
.mybg{
  fill:#c0392b;
}

.description{
  font-family: sans-serif;
  font-size: 3.8em;
  fill: #A10D59;
}
              
            
!

JS

              
                
              
            
!
999px

Console