Bootstrap snippet and html example. bs4 simple portfolio

Bootstrap 4.3.1 snippet "bs4 simple portfolio" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: portfolio

HTML code

Clean, semantic HTML that powers this Bootstrap 4.3.1 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<div class="container">
        <div class="row">
<div class="col-12">
  <div class="card">
    <div class="card-body">
      <div class="row">
        <div class="col-12">
          <div class="row portfolio-grid">
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="image">
                <figcaption>
                  <h4>Photography</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar2.png" alt="image">
                <figcaption>
                  <h4>Lifestyle</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar3.png" alt="image">
                <figcaption>
                  <h4>Tech Geeks</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar4.png" alt="image">
                <figcaption>
                  <h4>Explore World</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar6.png" alt="image">
                <figcaption>
                  <h4>Travel</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt="image">
                <figcaption>
                  <h4>Colors</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="image">
                <figcaption>
                  <h4>Through Nature</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar2.png" alt="image">
                <figcaption>
                  <h4>World</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar3.png" alt="image">
                <figcaption>
                  <h4>Cultures</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar4.png" alt="image">
                <figcaption>
                  <h4>Habits</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="image">
                <figcaption>
                  <h4>Being yourself</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar6.png" alt="image">
                <figcaption>
                  <h4>Nature</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt="image">
                <figcaption>
                  <h4>Routines</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="image">
                <figcaption>
                  <h4>Life</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
              <figure class="effect-text-in">
                <img src="https://bootdey.com/img/Content/avatar/avatar2.png" alt="image">
                <figcaption>
                  <h4>Vision</h4>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
                </figcaption>
              </figure>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
</div>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 4.3.1 to keep the design, spacing, and responsiveness consistent.

body{margin-top:20px;}
/* Portfolio */
.portfolio-grid figure {
  position: relative;
  float: left;
  overflow: hidden;
  width: 100%;
  background: #464dee;
  text-align: center;
  cursor: pointer;
}

.portfolio-grid figure img {
  position: relative;
  display: block;
  min-height: 100%;
  max-width: 100%;
  width: 100%;
  opacity: 0.8;
}

.portfolio-grid figure figcaption {
  padding: 2em;
  color: #ffffff;
  text-transform: uppercase;
  font-size: 1.25em;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.portfolio-grid figure figcaption:after, .portfolio-grid figure figcaption:before {
  pointer-events: none;
}

.portfolio-grid figure.effect-text-in {
  border-radius: 0.25rem;
}

.portfolio-grid figure.effect-text-in h4,
.portfolio-grid figure.effect-text-in img {
  -webkit-transition: -webkit-transform 0.35s;
  transition: transform 0.35s;
}

.portfolio-grid figure.effect-text-in img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.portfolio-grid figure.effect-text-in h4,
.portfolio-grid figure.effect-text-in p {
  position: absolute;
  bottom: 10px;
  left: 0;
  padding: 10px;
  margin-bottom: 0;
  width: 100%;
}

.portfolio-grid figure.effect-text-in p {
  text-transform: none;
  opacity: 0;
  -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
  transition: opacity 0.35s, transform 0.35s;
  -webkit-transform: translate3d(0, 50px, 0);
  transform: translate3d(0, 50px, 0);
}

.portfolio-grid figure.effect-text-in:hover img {
  -webkit-transform: translate3d(0, -80px, 0);
  transform: translate3d(0, -80px, 0);
}

.portfolio-grid figure.effect-text-in:hover h4 {
  -webkit-transform: translate3d(0, -100px, 0);
  transform: translate3d(0, -100px, 0);
}

.portfolio-grid figure.effect-text-in:hover p {
  opacity: 1;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

Similar snippets

Bootstrap example and template. Awesome portfolio

Awesome portfolio

Bootstrap example and template. portfolio grid with filter menu and isotopejs

portfolio grid with filter menu and isotopejs

Bootstrap example and template. Portfolio filter

Portfolio filter

Bootstrap example and template. bs4 portfolio

bs4 portfolio

Bootstrap example and template. user profile bio graph and total sales

user profile bio graph and total sales

Bootstrap example and template. user presentation profile with description

user presentation profile with description

Bootstrap example and template. User list

User list

Bootstrap example and template. Dropdown animation with CSS

Dropdown animation with CSS

FAQ

How do I use this snippet?

Include Bootstrap 4.3.1, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 4.3.1.

Bootstrap example and template. bs4 simple portfolio

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 7.5K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 4.3.1

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 4.3.1 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working