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

              
                <!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8" />
  <title>Document</title>
  <link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.amber-pink.min.css" />
  <script src="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.min.js"></script>
  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>

  <div class="mdl-layout mdl-js-layout mdl-layout--overlay-drawer-button">

    <header class="mdl-layout__header mdl-layout__header--waterfall">

      <!-- Top row, always visible -->
      <div class="mdl-layout__header-row">

        <!-- Title -->
        <span class="mdl-layout-title">Material Design Navigation Layouts</span>
        <div class="mdl-layout-spacer"></div>
        <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable mdl-textfield--floating-label mdl-textfield--align-right">
          <label class="mdl-button mdl-js-button mdl-button--icon" for="waterfall-exp"><i class="material-icons">search</i></label>
          <div class="mdl-textfield__expandable-holder">
            <input class="mdl-textfield__input" type="text" name="sample" id="waterfall-exp" />
          <!-- / .mdl-textfield__expandable-holder --></div>
        <!-- / .mdl-textfield mdl-js-textfield mdl-textfield--expandable mdl-textfield--floating-label mdl-textfield--align-right --></div>
      <!-- / .mdl-layout__header-row --></div>

        <!-- Bottom row, not visible on scroll -->
        <div class="mdl-layout__header-row">
          <div class="mdl-layout-spacer"></div>

          <!-- Navigation -->
          <nav class="waterfall-demo-header-nav mdl-navigation">
            <a class="mdl-navigation__link" href="">Link</a>
            <a class="mdl-navigation__link" href="">Link</a>
            <a class="mdl-navigation__link" href="">Link</a>
            <a class="mdl-navigation__link" href="">Link</a>
          </nav>
        <!-- / .mdl-layout__header-row --></div>
    </header>

    <div class="mdl-layout__drawer">
    <span class="mdl-layout-title">Material Design</span>
    <nav class="mdl-navigation">
    <a class="mdl-navigation__link" href="">Link</a>
    <a class="mdl-navigation__link" href="">Link</a>
    <a class="mdl-navigation__link" href="">Link</a>
    <a class="mdl-navigation__link" href="">Link</a>
    </nav>
    <!-- / .mdl-layout__drawer --></div>

    <main class="mdl-layout__content">
      <div class="page-content">
         <p><img src="http://creatorclip.info/wp-content/uploads/2015/07/material.png"></p>
         <p>ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。ここにコンテンツが入ります。</p>
      <!-- / .page-content --></div>
    </main>

  <!-- / .mdl-layout mdl-js-layout mdl-layout--overlay-drawer-button --></div>
  
</body>
</html>
              
            
!

CSS

              
                .waterfall-demo-header-nav .mdl-navigation__link:last-of-type  {
  padding-right: 0;
}
p {
  text-align:center;
}
img {
  max-width:100%;
  height:auto;
}
              
            
!

JS

              
                
              
            
!
999px

Console