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

              
                <!-- header -->
<header>
  <div class="nav">
    <div class="navbar-brand">
      <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14985/logo-2021.png" alt="" class="brand">
      <div class="brand-name">TSHIRT STORE</div>
    </div>
    <div class="category">
      <li class="men"><a class="nav-link" href="#activity">Men</a></li>
      <li class="women"><a class="nav-link" href="#activity">Women</a></li>
      <li class="kids"><a class="nav-link" href="#activity">Kids</a></li>
    </div>
    <div class="icons">
      <div class="icon-search">
        <i class="fas fa-search fa-lg"><a class="navbar-icon-link" href="#"></a></i>
      </div>
      <div class="icon-heart">
        <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
      </div>
      <div class="icon-buy">
        <i class="fas fa-shopping-bag fa-lg"><a class="navbar-icon-link" href="#"></a></i>
      </div>
    </div>

  </div>
</header>

<!-- filter -->
<section class="filter">
  <div class="container">
    <div class="filters">
      <div class="filter-title">Basic T-shirts</div>
      <div class="filter-zone">
        <div class="filter1">Size</div>
        <div class="filter2">Color</div>
        <div class="filter3">Sort</div>
      </div>

    </div>
  </div>
</section>

<!-- album1 -->
<section id="album">
  <div class="container">
    <div class="album-wrapper">
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14372/bastian-ignacio-vega-cani-9UAfLTqMoS0-unsplash__2_.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>

      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14365/anomaly-WWesmHEgXDs-unsplash.jpg" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <div class="card-description">29.00 USD</div>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14374/faith-yarn-hgtWvsq5e2c-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14373/christian-bolt-VW5VjskNXZ8-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14372/bastian-ignacio-vega-cani-9UAfLTqMoS0-unsplash__2_.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14365/anomaly-WWesmHEgXDs-unsplash.jpg" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14374/faith-yarn-hgtWvsq5e2c-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14373/christian-bolt-VW5VjskNXZ8-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14372/bastian-ignacio-vega-cani-9UAfLTqMoS0-unsplash__2_.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14365/anomaly-WWesmHEgXDs-unsplash.jpg" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14374/faith-yarn-hgtWvsq5e2c-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14373/christian-bolt-VW5VjskNXZ8-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14374/faith-yarn-hgtWvsq5e2c-unsplash.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
      <div class="card">
        <div class="icon-the-heart">
          <i class="far fa-heart fa-lg"><a class="navbar-icon-link" href="#"></a></i>
        </div>
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14362/t-shirt.png" alt="" class="card-img" />
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14372/bastian-ignacio-vega-cani-9UAfLTqMoS0-unsplash__2_.png" alt="" class="card-img2">
        <div class="card-text">
          <h3 class="card-title">T-shirt Stockholm Base Leaf Green</h3>
          <p class="card-description">29.00 USD</p>
        </div>
      </div>
    </div>
  </div>
</section>

<!-- page -->
<section>
  <div class="container">
    <div class="page">14/14</div>
  </div>
  <!-- banner -->
  <section>
    <div class="container">
      <div class="banner">
        <img src="https://assets-lighthouse.alphacamp.co/uploads/image/file/14376/template.png" alt="" class="banner">
        <div class="blanner-text">
          <h3 class="banner-title">Get the latest T-shirt drops in your inbox! Sign up for our Newsletter.</h3>
          <div class="input-buttom">
            <input class="input-box" type="email" id="footer_newsletter_email" name="newsletter[email]" data-placeholder="Enter email for news updates" placeholder="Enter email for news updates" value="">
            <button class="input-button" type="submit" id="footer_newsletter_send" name="newsletter[send]">Sign Up!</button>
          </div>
          <p class="banner-description">By registering you agree with our <span>Interity Policy</span>.</p>
        </div>

      </div>
    </div>
  </section>

  <!-- footer -->
  <div class="footer">
    <p>© 2021 Tshirt Store. All rights reserved.</p>
  </div>
  </div>
              
            
!

CSS

              
                /* 載入字型 */
@import url("https://fonts.googleapis.com/css?family=Noto+Sans+TC:400,700&display=swap&subset=chinese-traditional");

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
}
body {
  background-color: #f6f7f8;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  line-height: 0.9;
}

p {
  margin: 0;
}

ul,
li {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

.container {
  width: 95%;
  margin: 0 auto 0 auto;
}

/*共用按鈕樣式*/
.action {
  color: white;
  background: #39bae6;
  border-radius: 0.25rem;
  display: inline-block;
  font-size: 1rem;
  padding: 0.25rem 1rem;
  transition: all 0.1s linear;
}

.action:hover {
  background: #267c99;
  -webkit-box-shadow: 0px 1px 5px 0px rgba(87, 87, 87, 1);
  -moz-box-shadow: 0px 1px 5px 0px rgba(87, 87, 87, 1);
  box-shadow: 0px 1px 5px 0px rgba(87, 87, 87, 1);
}

.background-image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* header */
header {
  height: 60px;
  width: 100%;
}
.nav {
  position: fixed;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  height: 60px;
  grid-gap: 2rem;
  z-index: 2;
  background: #fff;
}

.navbar-brand {
  grid-column: 2/4;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
}
.brand {
  width: 40px;
  display: flex;
  justify-items: end;
}
.brand-name {
  font-size: 18px;
}
.category {
  position: absolute;
  display: none;
  display: grid;
  grid-auto-flow: column;
  line-height: 54px;
  opacity: 0;
}
.icons {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
.icon-search {
  position: fixed;
  top: 2rem%;
  left: 2rem;
}

/* filter */
.filter {
}

.filters {
  display: grid;
}
.filter-title {
  margin-top: 50px;
  width: 100%;
  text-align: center;
  font-size: 2rem;
}
.filter-zone {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  padding: 10px;
}
.filter1,
.filter2,
.filter3 {
  border: 1px solid black;
  display: flex;
  width: 40%;
  height: 40px;
  line-height: 40px;
  border-radius: 5px;
  margin: 10px;
  text-align: start;
  padding: 0 20px;
}

/* album */
.album-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  grid-gap: 1rem;
}
.card {
  position: relative;
  width: 100%;
  height: 100%;
  /*   overflow: hidden; */
}
.card-img {
  overflow: hidden;
}
.card-img,
.card-img2 {
  width: 100%;
  display: block;
  object-fit: cover;
}
.card-img2 {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
}
.card:hover .card-img {
  opacity: 0;
}
.card:hover .card-img2 {
  opacity: 1;
}
.card-text {
  position: relative;
  width: 100%;
  background: #f6f7f8;
  padding: 10px 0 0 0;
}
.card-title {
  font-size: 15px;
  text-decoration: underline;
}
.card-description {
  width: 100%;
  text-align: start;
}

.icon-the-heart {
  border-radius: 30px;
  border: none;
  position: absolute;
  z-index: 3;
  padding: 12px;
  background: #fff;
  top: 5%;
  left: 65%;
}
/*page*/
.page {
  width: 100%;
  height: 100%;
  text-align: center;
  margin: 100px 0;
}
/* banner*/
.banner {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: cover;
  position: relative;
}
.blanner-text {
  width: 100%;
  position: absolute;
  top: 0;
  margin-top: 30px;
  text-align: center;
}
.banner-title {
  padding: 20px;
  font-size: 15px;
}
.banner-description {
  padding: 10px;
  font-size: 10px;
}
span {
  text-decoration: underline;
}

.input-box {
  width: 30%;
  border-style: none;
  border-radius: 30px 0 0 30px;
  line-height: 30px;
  padding: 1px 20px;
  outline: none;
}
.input-button {
  position: relative;
  left: -8px;
  border-style: none;
  border-radius: 0 25px 25px 0;
  background: black;
  color: #fff;
  line-height: 30px;
  font-weight: 500;
}

.footer {
  position: relative;
  top: 0px;
  text-align: center;
  background: #f0f0f0;
}

/* 電腦尺寸 */
@media screen and (min-width: 768px) {
  .navbar-brand {
    grid-column: 1/2;
    justify-content: start;
    padding-left: 20px;
  }
  .category {
    opacity: 1;
    grid-column: 2/4;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
  }
  .men,
  .women,
  .kids {
    padding: 0 20px;
  }
  .icon-search {
    all: unset;
  }
  .icons {
    grid-column: 4/5;
  }
  .filter-zone {
    all: unset;
    display: flex;
    justify-content: center;
    padding: 10px;
  }
  .filter1,
  .filter2,
  .filter3 {
    display: inline-block;
    width: 20%;
    text-align: start;
    padding: 0 20px;
  }
  .card-title {
    text-decoration: none;
  }

  .card-text,
  .card-description {
    text-align: center;
  }

  .album-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .icon-the-heart {
    top: 10%;
    left: 75%;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console