#07 Photo Card

Preview

Let's travel together

Your dream vacation

HTML

SCSS


*, ::after, ::before {
  box-sizing: border-box;
}

/* css element */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;700;900&display=swap');

.card-photo {
  width: 200px;
  height: 280px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin: 10px;
  
  img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
  }
  
  .information {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    padding: 20px;
    background: rgba(0,0,0,0);
    background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(0,0,0,0)), color-stop(100%, rgba(0,0,0,1)));
    background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    background: -o-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000', GradientType=0 );
    
    h3 {
      color: #ffffff;
      font-size: 15px;
      font-weight: 400;
      margin: 0 0 8px 0;
    }
  }
  
  .card-footer {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: center;
    align-items: center;
    justify-content: space-between;
    
    .location {
        
      svg {
        fill: #ffffff;
        width: 10px;
        vertical-align: middle;
      }
      
      .name {
        font-family: 'Fira Sans', sans-serif;
        color: #ffffff;
        font-size: 12px;
        margin-left: 5px;
      }
    }
    
    .score {
      padding: 5px 10px;
      border-radius: 20px;
      background-color: #5eaaa8;
      
      svg {
        fill: #ffffff;
        width: 14px;
        vertical-align: middle;
      }
      
      .value {
        font-family: 'Fira Sans', sans-serif;
        color: #ffffff;
        font-size: 13px;
      }
    }
  }
}


Notes

In the code you can replace the images, icons and font. For icons and font you may have to change the size in the css.

Help the Project

Your help is important for the success of this project. We will make this project grow for everyone.