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

              
                <div id="container">
  
  <h1>Header</h1>
  
  <p>Lorizzle ipsum dolizzle sit fo shizzle, consectetuer adipiscing brizzle. Nullam bling bling velit, rizzle volutpizzle, rizzle its fo rizzle, hizzle go to hizzle, black. Pellentesque egizzle tortor.</p>
  
  <p>Shizzle my nizzle crocodizzle own yo' owned tellizzle. Ut its fo rizzle adipiscing . Brizzle dope est. Rizzle sapizzle , mah nizzle mah nizzle, accumsan crackalackin, mah nizzle shizzle my nizzle crocodizzle, pede.</p>
  
  <button id="modal-open">Click me</button>

  <div id="modal-container">

    <div id="modal-content">

      <span class="modal-close">Close</span>

      <div id="myChart"></div> 

    </div>

  </div> 

</div>
              
            
!

CSS

              
                *,
html,
body {
  box-sizing: border-box;
  margin: 0;
}

#container {
  display: flex;
  align-items: center;
  flex-flow: column wrap;
  margin: 0;
  height: 100vh;
  background-color: #333;
  font-family: Roboto;
  color: #fff;
}

#container h1 {
  padding: 20px;
}

#container p {
  padding: 20px;
}

#modal-open {
  padding: 10px;
  border: 1px solid #fff;
  border-radius: 5px;
  cursor: pointer;
  background-color: transparent;
  font-size: 18px;
  color: #fff;
}

#modal-container {
  position: fixed;
  top: 0%;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: none;
  transform: translate(0, -800px);
  transition: .5s ease-in-out;
}

#modal-container.open{
  transform: translate(0, 0);
}

#modal-content {
  margin: 10px auto;
  padding: 20px;
  width: 80%;
  height: 350px;
  background-color: #fff;
  border: 1px solid #505050;
  border-radius: 10px;
}

.modal-close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
              
            
!

JS

              
                var myConfig = {
  type: 'bar',
  globals: {
    fontfamily: 'Roboto',
    fontColor: '#333'
  },
  series: [{
    values: [35, 42, 67, 89, 25, 34, 67, 85],
    backgroundColor: '#333'
  }]
};

zingchart.render({
  id: 'myChart',
  data: myConfig,
  height: '300px',
  width: '100%'
});

var $modal = $('#modal-container');

$("#modal-open").click(function(){
  $modal.addClass('open');
})

$(".modal-close").click(function(){
  $modal.removeClass('open');
});



              
            
!
999px

Console