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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <div class="contents">
  <main class="contents-main">
    <div class="mod-guidemap">
      <header class="mod-guidemap__heading">
        <h1 class="mod-guidemap__title">
          <span class="ja">新宿駅 周辺案内図</span>
          <span class="en">Shinjuku Stn. Area Map</span>            
        </h1>
        <ul class="list-station">
          <li class="list-station__item keio">京王線・京王新線</li>
          <li class="list-station__item toei-shinjuku">都営新宿線</li>
          <li class="list-station__item toei-ooedo">都営大江戸線</li>
          <li class="list-station__item jr">JR線</li>
          <li class="list-station__item odakyu">小田急線</li>
          <li class="list-station__item marunouchi">丸ノ内線</li>
          <li class="list-station__item hukutoshin">副都心線</li>
        </ul>
      </header>
      <div class="mod-guidemap__body">
        <div class="maps"><iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d4426.628429937656!2d139.69919912935953!3d35.68976187153332!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x60188cd0d6b1ba1f%3A0x1c32a1f1ecacfdd5!2z5paw5a6_6aeF!5e0!3m2!1sja!2sjp!4v1512410458800" width="800" height="400" frameborder="0" style="border:0" allowfullscreen></iframe></div>
      </div>
    </div>
  </main>
  <div class="contents-sub">
    <h2 class="contents-sub__title">
      <span class="ja">出口7</span>
      <span class="en">Exit No.7</span>
    </h2>
    <nav class="nav-sub-contents">
      <h3 class="nav-sub-contents__title">
        <span class="ja">西新宿2〜3丁目</span>
        <span class="en">Nishi-Shinjuku 2〜3</span>
      </h3>
      <ul class="nav-sub-contents__in">
        <li class="nav-sub-contents__item">
          <span class="ja">新宿郵便局</span>
          <span class="en">Shinjuku Post Office</span>
        </li>
        <li class="nav-sub-contents__item">
          <span class="ja">京王プラザホテル</span>
          <span class="en">Keio Plaza Hotel</span>
        </li>
        <li class="nav-sub-contents__item">
          <span class="ja">工学院大学</span>
          <span class="en">Kogakuen Univ.</span>
        </li>
        <li class="nav-sub-contents__item">
          <span class="ja">新宿中央公園</span>
          <span class="en">Shinjuku Chuo Park</span>
        </li>
      </ul>
    </nav>
  </div>
</div>
              
            
!

CSS

              
                //リセット、調整
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  font-size: 10px;
}

.contents {
  display: flex;
  width: 900px;
  margin: 30px auto;
  border: 10px solid #000;
}

.contents-main {
  flex: 1;
}
.contents-sub {
  width: 250px;
  border-left: 10px solid #000;
}

.mod-guidemap {
  padding: 20px 30px 30px;
  &__heading {
    overflow: hidden;
    position: relative;
    padding-bottom: 20px;
    border-bottom: 1px solid #000;
  }
  &__body {
    padding-top: 20px;
    .maps {
      iframe {
       width: 100%; 
      }
    }
  }
}

.mod-guidemap__title {
  float: left;
  padding: 10px 0 30px;
  color: #000;
  span {
    display: block;
  }
  .ja {
    font-size: 2.4rem;
  }
  .en {
    font-size: 1.1rem;
  }
}

.list-station {
  float: right;
  &__item {
    position: relative;
    margin-bottom: 0.35em;
    padding-left: 70px;
    list-style-type: none;
    font-size: 1.0rem;
    &last-child {
      margin-bottom: 0;
    }
    &::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      width: 50px;
      height: 2px;
      margin-top: -4px;
    }
  }
}

//それぞれの設定
.list-station__item {
  &.keio {
    &::before {
     border-top: 2px solid #750000;
     border-bottom: 2px solid #750000;
    }
  }
  &.toei-shinjuku {
    &::before {
     border-top: 2px solid #6cbb5a;
     border-bottom: 2px solid #6cbb5a;
    }
  }
  &.toei-ooedo {
    &::before {
     border-top: 2px solid #b6007a;
     border-bottom: 2px solid #b6007a;
    }
  }
  &.jr {
    &::before {
      height: 5px;
      border: 1px solid #000;
      background-image: linear-gradient(to right, #000, #000 5px, transparent 8px, transparent 8px);
      background-size: 12px 10px;
      background-position: top;
      background-repeat: repeat-x;
    }
  }
  &.odakyu {
    &::before {
     border-top: 2px solid #2c539f;
     border-bottom: 2px solid #2c539f;
    }
  }
  &.marunouchi {
    &::before {
     border-top: 2px solid #e60012;
     border-bottom: 2px solid #e60012;
    }
  }
  &.hukutoshin {
    &::before {
     border-top: 2px solid #bb641d;
     border-bottom: 2px solid #bb641d;
    }
  }
}



.contents-sub__title {
  padding: 10px 20px;
  background-color: #FFD54F;
  text-align: right;
  span {
    display: block;
  }
  .ja {
    font-size: 2.9rem;
  }
  .en {
    font-size: 1.3rem;
  }
}

.nav-sub-contents {
  padding: 20px 20px 20px 10px;
  &__title {
    margin-bottom: 1.0em;
    text-align: right;
    span {
      display: block;
    }
    .ja {
      font-size: 2.0rem;
    }
    .en {
      font-size: 1.2rem;
    }
  }
  
  &__item {
    margin-bottom: 1.0em;
    list-style-type: none;
    text-align: right;
    &last-child {
      margin-bottom: 0;
    }
    span {
      display: block;
    }
    .ja {
      font-size: 1.8rem;
    }
    .en {
      font-size: 1.0rem;
    }
  }
  
}
              
            
!

JS

              
                
              
            
!
999px

Console