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

              
                <div class="container">
  <main>
    <section class="sec02">
      <h2 class="title">My Challenge</h2>
      <div class="flex">
        <article class="post">
          <img src="https://picsum.photos/600/300?1" alt="談話">
          <p class="flexible">もくもく会in大阪のコーディング
            イベントに参加してきました!!</p>
          <time datetime="2020-06-28">2020.06.28</time>
        </article>
        <article class="post">
          <img src="https://picsum.photos/600/300?2" alt="笑顔の女性">
          <p class="flexible">模写コーディングを1つ終わらせ
            ることができました!!次はもう
            少し難しいものに挑戦します!</p>
          <time datetime="2020-07-02">2020.07.02</time>
        </article>
        <article class="post">
          <img src="https://picsum.photos/600/300?3" alt="ライトアップ">
          <p class="flexible">「1冊ですべて身につくHTML&C
            SSとWebデザイン入門講座」を
            完走しました!!</p>
          <time datetime="2020-07-10">2020.07.10</time>
        </article>
      </div>
      <button class="more">もっと見る</button>
    </section>
  </main>
</div>
              
            
!

CSS

              
                @charset "utf-8";

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
}
a {
  text-decoration: none;
  color: #333;
}
* {
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1366px;
  margin: 0 auto;
}
/* 
sec02
*/
.sec02 {
  background-color: #fff;
  padding: 60px 193px 88px;
  text-align: center;
}
.title {
  margin-bottom: 49px;
}
.flex {
  display: flex;
  justify-content: space-between;
  align-items: stretch; /* 修正 */
  gap: 20px;
}
.post {
  display: flex;
  flex-direction: column;
  gap: 20px 20px;
  width: calc(33.3% - 20px * 2 / 3);
  box-shadow: 2px 2px 2px 2px #eee;
  text-align: left;
}
.post img {
  width: 100%;
  min-height: 100px;  /* 修正 */
  object-fit: cover;  /* 修正 */
}
.flexible {
  margin: 0px 20px;
  flex-grow: 1;
}
.post time {
  margin: 0 20px;
}
.more {
  margin: 46px auto 0;
  padding: 17px 110px;
  border: 1px solid #eeeeee;
  box-shadow: 0px 3px 6px 2px #eee;
  background-color: #fff;
  font-weight: bold;
}
@media (max-width: 768px) {
  .sec02 {
    padding: 40px 0px 60px;
  }
  .flex {
    display: block;
  }
  .post {
    width: 100%;
  }
  .post img {
    height: 155px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console