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="accordion">
  <div class="img-container">
    <img src="https://i.imgur.com/XJtqz1w.png" />
    <div class="cover">
      <div>Wing Zero</div>
    </div>
    <div class="caption">
      <div>XXXG-00W0</div>
      <div>Wing Gundam Zero</div>
      <div>ウイングゲンダムゼロ</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/ZaXl3Uo.png" />
    <div class="cover">
      <div>Deathscythe Hell</div>
    </div>
    <div class="caption">
      <div>XXXG-01D2</div>
      <div>Gundam Deathscythe Hell</div>
      <div>ガンダムデスサイズヘル</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/HPv0jNp.png" />
    <div class="cover">
      <div>Heavy Arms Custom</div>
    </div>
    <div class="caption">
      <div>XXXG-01H2</div>
      <div>Gundam Heavy Arms Custom</div>
      <div>ガンダムヘビーアームズ</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/S7FPurl.png" />
    <div class="cover">
      <div>Sandrock Custom</div>
    </div>
    <div class="caption">
      <div>XXXG-01SR2</div>
      <div>Gundam Sandrock Custom</div>
      <div>ガンダムサンドロック</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/maoEY9X.png" />
    <div class="cover">
      <div>Altron</div>
    </div>
    <div class="caption">
      <div>XXXG-01S2</div>
      <div>Altron Gundam</div>
      <div>アルトロンガンダム</div>
    </div>
  </div>
</div>

<div class="centered">
  <div class="title">Know Your Gundam</div>
</div>

<div class="accordion">
  <div class="img-container">
    <img src="https://i.imgur.com/BD4hNXZ.png" />
    <div class="cover">
      <div>Wing Zero Custom</div>
    </div>
    <div class="caption">
      <div>XXXG-00W0</div>
      <div>Wing Gundam Zero Custom</div>
      <div>ウイングゲンダムゼロ</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/iVH1nNi.png" />
    <div class="cover">
      <div>Deathscythe Hell</div>
    </div>
    <div class="caption">
      <div>XXXG-01D2</div>
      <div>Gundam Deathscythe Hell (EW)</div>
      <div>ガンダムデスサイズヘル</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/mc0sH1I.png" />
    <div class="cover">
      <div>Heavy Arms Custom</div>
    </div>
    <div class="caption">
      <div>XXXG-01H2</div>
      <div>Gundam Heavy Arms Custom (EW)</div>
      <div>ガンダムヘビーアームズ</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/c48Dd1v.png" />
    <div class="cover">
      <div>Sandrock Custom</div>
    </div>
    <div class="caption">
      <div>XXXG-01SR2</div>
      <div>Gundam Sandrock Custom (EW)</div>
      <div>ガンダムサンドロック</div>
    </div>
  </div>
  <div class="img-container">
    <img src="https://i.imgur.com/YxovOi4.png" />
    <div class="cover">
      <div>Altron</div>
    </div>
    <div class="caption">
      <div>XXXG-01S2</div>
      <div>Altron Gundam EW Version</div>
      <div>アルトロンガンダム</div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

body, html {
  font-family: Arial, Helvetica, sans-serif;
  padding: 0;
  margin: 0;
  background-color: #333333;
  --app-margin: 14px;
  --app-accorion-height: 400px;
}

.spacer {
  height: 24px;
}

.centered {
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: auto;
}

.wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

/*----- accordion ------*/

.accordion {
  max-width: 600px;
  width: 100%;
  height: var(--app-accorion-height);
  border: 1px solid;
  margin: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  background-color: rgba(255, 255, 255, 0.2);
}

.accordion .img-container {
  border-right: 1px solid;
  flex: 1;
  flex-grow: 1;
  width: 100%;
  height: auto;
  overflow: hidden;
  position: relative;
  transition: flex-grow 0.3s ease-in-out;
}

.accordion .img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.accordion .img-container:last-child {
  border-right: none;
}

.accordion .img-container:hover {
  flex-grow: 4;
  cursor: pointer;
}

/*----- transitions ------*/

.accordion .img-container:hover .cover {
  top: 0;
}

.accordion .img-container:hover .caption {
  top: 73%;
}

/*----- accordion cover ------*/

.cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.7) 100%
  );
  position: absolute;
  top: var(--app-accorion-height);
  transition: top 0.3s ease-in-out;
}

.cover div {
  font-family: 'Bebas Neue', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  color: rgba(255, 255, 255, 0.2);
  text-shadow: 0 4px 6px rgba(255, 255, 255, 0.2);
  font-size: 45px;
  width: 100%;
  text-align: right;
  position: absolute;
  writing-mode: vertical-rl;
  text-orientation: sideways-right;
  overflow: hidden;
  word-wrap: none;
  padding-top: 14px;
}

/*----- text caption------*/

.caption {
  height: 50%;
  position: absolute;
  top: var(--app-accorion-height);
  color: #ffffff;
  padding: 16px;
  transition: top 0.4s ease-in-out 0.3s;
}

.caption div {
  font-family: 'Bebas Neue', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  line-height: 25px;
}

.caption div:first-child {
  font-size: 40px;
}

.caption div:nth-child(2) {
  font-size: 18px;
  border-bottom: 1px solid #ffffff;
}

.caption div:nth-child(3) {
  letter-spacing: -3px;
}

.font-test {
  font-family: 'Bebas Neue', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  padding: 0px;
}

/*----- page title------*/

.title {
  font-family: 'Bebas Neue', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 80px;
  line-height: 80px;
  color: #ffffff;
  font-weight: normal;
  text-align: center;
  padding: 16px 0 10px 0;
}


              
            
!

JS

              
                
              
            
!
999px

Console