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

              
                <main class="main" role="main">
  <h1 class="ttl-line">改札外</h1>
  <section class="sec-shopinfo">
    <header class="ttl-shopinfo ttl-shopinfo--foodhall">
      <h2 class="ttl-shopinfo__title">フードホール</h2>
      <p class="ttl-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 - 28:00</time></p>
    </header>
    <ul class="list-shopinfo">
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--foodhall">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1493770348161-369560ae357d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=43928cf2624c678e9b9b36698ce62baf" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">monosus bar</h3>
            <p class="card-shopinfo__id">F1</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 - 28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--foodhall">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1473269712320-f24ce5aa6e5d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=0e235d546a3cd859692f312dbe3b6fcc" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">SUSHI MONO</h3>
            <p class="card-shopinfo__id">F2</p>
            <p class="card-shopinfo__category">すし</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 - 28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--foodhall">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1414235077428-338989a2e8c0?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=2128326d688f2d01cd054bac7bb2c303" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">Bakery & Restaulant<br>MARUYAMA</h3>
            <p class="card-shopinfo__id">F3</p>
            <p class="card-shopinfo__category">ベーカリー・レストラン</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00-28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--foodhall">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1493770348161-369560ae357d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=43928cf2624c678e9b9b36698ce62baf" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">monosus bar</h3>
            <p class="card-shopinfo__id">F4</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 - 28:00</time></p>
          </div>
        </div>
      </li>
    </ul>
  </section>
  <section class="sec-shopinfo">
    <header class="ttl-shopinfo ttl-shopinfo--ekisoto">
      <h2 class="ttl-shopinfo__title">エキソト</h2>
    </header>
    <ul class="list-shopinfo">
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--ekisoto">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1493770348161-369560ae357d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=43928cf2624c678e9b9b36698ce62baf" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">monosus bar</h3>
            <p class="card-shopinfo__id">S1</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 -28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--ekisoto">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1473269712320-f24ce5aa6e5d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=0e235d546a3cd859692f312dbe3b6fcc" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">SUSHI MONO</h3>
            <p class="card-shopinfo__id">S2</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00-28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--ekisoto">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1493770348161-369560ae357d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=43928cf2624c678e9b9b36698ce62baf" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">monosus bar</h3>
            <p class="card-shopinfo__id">S3</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 -28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--ekisoto">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1473269712320-f24ce5aa6e5d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=0e235d546a3cd859692f312dbe3b6fcc" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">SUSHI MONO</h3>
            <p class="card-shopinfo__id">S4</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00-28:00</time></p>
          </div>
        </div>
      </li>
      <li class="list-shopinfo__item">
        <div class="card-shopinfo card-shopinfo--ekisoto">
          <figure class="card-shopinfo__image">
            <img src="https://images.unsplash.com/photo-1493770348161-369560ae357d?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=43928cf2624c678e9b9b36698ce62baf" alt="">
          </figure>
          <div class="card-shopinfo__details">
            <h3 class="card-shopinfo__title">monosus bar</h3>
            <p class="card-shopinfo__id">S5</p>
            <p class="card-shopinfo__category">レストランバー</p>
            <p class="card-shopinfo__date">Open<time class="time" datetime="7:00-28:00">7:00 -28:00</time></p>
          </div>
        </div>
      </li>
    </ul>
  </section>
</main>
              
            
!

CSS

              
                //変数
$COLOR_FOODHALL: #ad1457;
$COLOR_EKISOTO: #000;

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

//main
.main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 30px 15px;
  border: 1px solid #000;
}

//sectionどうしのマージン間隔
.sec-shopinfo + .sec-shopinfo {
  margin-top: 4.0em;
}

//分割線付き見出し: 「改札外」
.ttl-line {
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25em;
  font-size: 2.0rem;
  font-weight: bold;
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100%;
    height: 2px;
    margin-left: 1.0em;
    background-color: #000;
  }
}

//ショップ情報見出しヘッダー
.ttl-shopinfo {
  display: flex;
  align-items: center;
  padding: 20px 15px;
  margin-bottom: 4.0em;
  color: #fff;
  //見出し
  &__title {
    font-size: 1.8rem;
    font-weight: bold;
  }
  //営業時間
  &__date {
    margin-left: 2.0em;
    font-size: 1.5rem;
    .time {
      margin-left: 0.5em;
      font-size: 1.5rem;
    }
  }
}

//カテゴリ別 共通
.ttl-shopinfo--foodhall,
.ttl-shopinfo--ekisoto {
  position: relative;
  padding-left: 60px;
  &::before {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 15px;
    width: 30px;
    height: 30px;
    border: 1px solid #fff;
    border-radius: 50%;
    text-align: center;
  }
}
//カテゴリ別 フードホール
.ttl-shopinfo--foodhall {
  background-color: $COLOR_FOODHALL;
  &::before {
    content: 'F';
  }
}
//カテゴリ別 エキソト
.ttl-shopinfo--ekisoto {
  background-color: $COLOR_EKISOTO;
  &::before {
    content: 'S';
  }
}

.list-shopinfo {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0 -5px;
  list-style-type: none;
  &__item {
    width: 20%;
    padding: 0 5px;
  }
}

//カード型
.card-shopinfo {
  position: relative;
  height: 100%;
  &__image {
    padding-bottom: 10px;
    background-color: #fff;
    img {
      width: 100%;
      height: auto;
      vertical-align: middle;
    }
  }
  &__details {
    position: relative;
    padding: 0.75em 0.75em 0.75em 3.25em;
    color: #fff;
  }
  &__title {
    min-height: 3.5em;
    font-size: 1.3rem;
  }
  &__id {
    position: absolute;
    top: 0.55em;
    left: 0.75em;
    font-size: 1.2rem;
  }
  &__category,
  &__date {
    font-size: 0.8rem;
  }
  &__date {
    .time {
      margin-left: 0.5em;
    }
  }
}

//カテゴリ別 フードホール
.card-shopinfo--foodhall {
  background-color: $COLOR_FOODHALL;
  .card-shopinfo__details {
  }
}
//カテゴリ別 エキソト
.card-shopinfo--ekisoto {
  background-color: $COLOR_EKISOTO;
  .card-shopinfo__details {
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console