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 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

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="l-container">
  
  <div class="olex" data-gutter="normal" data-order="reverse">
    
    <div class="olex__item" data-grid="sp12 lap4">  
     <h3 lang="en">Flexible</h3>
     <p class="c-detail">
       スマホ、タブレット、PCで異なるカラムのレイアウトも容易に対応できます。 12カラムをベースとして、必要なカラム数をカスタムデータ属性で指定するだけでレイアウトが可能。
      </p>
    </div>
    <div class="olex__item" data-grid="sp12 lap8">
      <ul class="olex">
        <li class="olex__item" data-grid="sp6">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto01.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto01.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto01@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 6/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp6">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto02.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto02.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto02@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 6/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp6 tab3">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto10.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto10.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto10@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 3/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp6 tab3">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto11.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto11.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto11@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 3/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp6 tab3">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto12.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto12.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto12@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 3/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp6 tab3">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto13.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto13.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto13@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 3/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp12 tab8">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto06.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto06.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto06@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 12/12 - TAB: 8/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp6 tab4">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto07.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto07.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto07@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 4/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>

        <li class="olex__item" data-grid="sp6 tab4">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto08.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto08.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto08@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 6/12 - TAB: 4/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp12 tab8">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto09.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto09.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto09@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 12/12 - TAB: 8/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp4">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto03.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto03.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto03@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 4/12 - TAB: 4/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp4">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto04.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto04.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto04@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 4/12 - TAB: 4/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
        <li class="olex__item" data-grid="sp4">
          <figure>
            <img src="https://shibajuku.net/demo/olex/assets/img/img-kyoto05.jpg" srcset="https://shibajuku.net/demo/olex/assets/img/img-kyoto05.jpg, https://shibajuku.net/demo/olex/assets/img/img-kyoto05@2x.jpg 2x" alt="" class="c-card__image p-gallery__image" />
            <figcaption>SP: 4/12 - TAB: 4/12</figcaption>
          </figure>
          <!-- /.c-card -->
        </li>
      </ul>
    </div>
  </div>
  <!-- /.olex -->
</div>
<!-- /.l-spacer -->
              
            
!

CSS

              
                .olex {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.olex__item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* 
  Order 
*/
.olex[data-order="normal"] {
  flex-direction: row;
}

.olex[data-order="reverse"] {
  flex-direction: row-reverse;
}

/*
  Align 
*/
.olex[data-align="start"] {
  justify-content: flex-start;
}

.olex[data-align="center"] {
  justify-content: center;
}

.olex[data-align="end"] {
  justify-content: flex-end;
}

.olex[data-align="justify"] {
  justify-content: space-between;
}

.olex__item[data-align~="top"] {
   justify-content: flex-start;
}

.olex__item[data-align~="middle"] {
   justify-content: center;
}

.olex__item[data-align~="bottom"] {
   justify-content: flex-end;
}

.olex__item[data-align~="start"] {
  align-items: flex-start;
  width: 100%;
}

.olex__item[data-align~="center"] {
  align-items: center;
}

.olex__item[data-align~="end"] {
  align-items: flex-end;
}


/* 
  Gutter
*/ 
.olex[data-gutter] {
  width: auto;
}

.olex[data-gutter] > .olex__item {
  border: solid transparent;
  background-clip: padding-box;
}
.olex[data-gutter="small"] {
  margin: -1.25vw;
}

.olex[data-gutter="small"] > .olex__item {
  border-width: 1.25vw;
}

.olex[data-gutter="normal"] {
  margin: -2.5vw;
}

.olex[data-gutter="normal"] > .olex__item {
  border-width: 2.5vw;
}

.olex[data-gutter="large"] {
  margin: -3.75vw;
}

.olex[data-gutter="large"] > .olex__item {
  border-width: 3.75vw;
}

@media screen and (min-width: 768px) {
  .olex[data-gutter="small"] {
    margin: -0.5vw;
  }

  .olex[data-gutter="small"] > .olex__item {
    border-width: 0.5vw;
  }
  .olex[data-gutter="normal"] {
    margin: -1vw;
  }

  .olex[data-gutter="normal"] > .olex__item {
    border-width: 1vw;
  }

  .olex[data-gutter="large"] {
    margin: -1.5vw;
  }

  .olex[data-gutter="large"] > .olex__item {
    border-width: 1.5vw;
  }

}

/*
  Grid
*/
.olex__item[data-grid~="sp1"] {
  width: 8.33333%;
}

.olex__item[data-grid~="sp2"] {
  width: 16.66667%;
}

.olex__item[data-grid~="sp3"] {
  width: 25%;
}

.olex__item[data-grid~="sp4"] {
  width: 33.33333%;
}

.olex__item[data-grid~="sp5"] {
  width: 41.66667%;
}

.olex__item[data-grid~="sp6"] {
  width: 50%;
}

.olex__item[data-grid~="sp7"] {
  width: 58.33333%;
}

.olex__item[data-grid~="sp8"] {
  width: 66.66667%;
}

.olex__item[data-grid~="sp9"] {
  width: 75%;
}

.olex__item[data-grid~="sp10"] {
  width: 83.33333%;
}

.olex__item[data-grid~="sp11"] {
  width: 91.66667%;
}

.olex__item[data-grid~="sp12"] {
  width: 100%;
}

.olex__item[data-grid~="spFive"] {
  width: 20%;
}


@media screen and (min-width: 768px) {
  .olex__item[data-grid~="tab1"] {
    width: 8.33333%;
  }
  .olex__item[data-grid~="tab2"] {
    width: 16.66667%;
  }
  .olex__item[data-grid~="tab3"] {
    width: 25%;
  }
  .olex__item[data-grid~="tab4"] {
    width: 33.33333%;
  }
  .olex__item[data-grid~="tab5"] {
    width: 41.66667%;
  }
  .olex__item[data-grid~="tab6"] {
    width: 50%;
  }
  .olex__item[data-grid~="tab7"] {
    width: 58.33333%;
  }
  .olex__item[data-grid~="tab8"] {
    width: 66.66667%;
  }
  .olex__item[data-grid~="tab9"] {
    width: 75%;
  }
  .olex__item[data-grid~="tab10"] {
    width: 83.33333%;
  }
  .olex__item[data-grid~="tab11"] {
    width: 91.66667%;
  }
  .olex__item[data-grid~="tab12"] {
    width: 100%;
  }
}

@media screen and (min-width: 1024px) {

  .olex__item[data-grid~="lap1"] {
    width: 8.33333%;
  }
  .olex__item[data-grid~="lap2"] {
    width: 16.66667%;
  }
  .olex__item[data-grid~="lap3"] {
    width: 25%;
  }
  .olex__item[data-grid~="lap4"] {
    width: 33.33333%;
  }
  .olex__item[data-grid~="lap5"] {
    width: 41.66667%;
  }
  .olex__item[data-grid~="lap6"] {
    width: 50%;
  }
  .olex__item[data-grid~="lap7"] {
    width: 58.33333%;
  }
  .olex__item[data-grid~="lap8"] {
    width: 66.66667%;
  }
  .olex__item[data-grid~="lap9"] {
    width: 75%;
  }
  .olex__item[data-grid~="lap10"] {
    width: 83.33333%;
  }
  .olex__item[data-grid~="lap11"] {
    width: 91.66667%;
  }
  .olex__item[data-grid~="lap12"] {
    width: 100%;
  }
}

@media screen and (min-width: 1200px) {
  .olex__item[data-grid~="desk1"] {
    width: 8.33333%;
  }
  .olex__item[data-grid~="desk2"] {
    width: 16.66667%;
  }
  .olex__item[data-grid~="desk3"] {
    width: 25%;
  }
  .olex__item[data-grid~="desk4"] {
    width: 33.33333%;
  }
  .olex__item[data-grid~="desk5"] {
    width: 41.66667%;
  }
  .olex__item[data-grid~="desk6"] {
    width: 50%;
  }
  .olex__item[data-grid~="desk7"] {
    width: 58.33333%;
  }
  .olex__item[data-grid~="desk8"] {
    width: 66.66667%;
  }
  .olex__item[data-grid~="desk9"] {
    width: 75%;
  }
  .olex__item[data-grid~="desk10"] {
    width: 83.33333%;
  }
  .olex__item[data-grid~="desk11"] {
    width: 91.66667%;
  }
  .olex__item[data-grid~="desk12"] {
    width: 100%;
  }
  
  
}



/* ここから下は Olex 関係ない */
.l-container {
  margin: 5rem 5%; 
}

body {
  line-height: 1.5;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1em;
}
img {
  width: 100%;
}
              
            
!

JS

              
                
              
            
!
999px

Console