html – How to add image ontop of step progress bar?

html – How to add image ontop of step progress bar?

Are you looking for something like this?

.progressbar {
  counter-reset: step;
}
.progressbar li {
  list-style-type: none;
  float: left;
  width: 33.33%;
  position: relative;
  text-align: center;
}
.progressbar li:before {
  content: counter(step);
  counter-increment: step;
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  display: block;
  text-align: center;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background-color: white;
}
.progressbar li:after {
  content: ;
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #ddd;
  top: 15px;
  left: -50%;
  z-index: -1;
}
.progressbar li:first-child:after {
  content:none;
}
.progressbar li.active {
  color: green;
}
.progressbar li.active:before {
  border-color: #3aac5d;
  background: #3aac5d;
  color: white;
  content: ;
  background-image: url(https://i.picsum.photos/id/1036/4608/3072.jpg?hmac=Tn9CS_V7lFSMMgAI5k1M38Mdj-YEJR9dPJCyeXNpnZc);
background-size: 30px 30px;
    width: 30px;
    height: 30px;
}
.progressbar li.active + li:after {
  background-color: green;
}

.container {
  padding: 1px 1px 1px 1px;
  border: 0px solid lightgrey;
  border-radius: 3px;
}
<div class=container>
  <ul class=progressbar>
    <li class=active> step 1</li>
    <li>step 2</li>
    <li>step 3</li>
  </ul>
</div>

Looking the Youtube link as you mentioned.

<div class=container>
  <ul class=progressbar>
    <li class=active>
      <img src=IMAGE_PATH>
      <p>Step 1</p>
    </li>
    <li>
      <img src=IMAGE_PATH>
      <p>Step 2</p>
    </li>
    <li>
      <img src=IMAGE_PATH>
      <p>Step 3</p>
    </li>
  </ul>
</div>

html – How to add image ontop of step progress bar?

Leave a Reply

Your email address will not be published.