skip to Main Content

the current code is below

.wrap {
  display: flex;
  gap: 30px;
}
.item {
  flex-basis: 382px;
  background-image: url(https://i.ibb.co/Jn6J3qN/card.png);
  background-repeat: no-repeat;
  background-size: сontain;
  flex-basis: 382px;
  min-height: 218px;
  border-radius: 20px;
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.25);
  padding: 32px;
}
<div class="wrap">
  <div class="item"></div>
  <div class="item"></div>
</div>

2

Answers


  1. Just set .item background linear-gradient and also set parameters for it.
    You can use this colour picker tools, like this website: https://cssgradient.io/, to set linear-gradient parameters.

    .wrap {
      display: flex;
      gap: 30px;
    }
    .item {
      flex-basis: 382px;
      background: rgb(12,28,87);
      background: linear-gradient(156deg, rgba(12,28,87,1) 0%, 
      rgba(83,81,147,1) 100%);
      background-repeat: no-repeat;
      background-size: сontain;
      flex-basis: 382px;
      min-height: 218px;
      border-radius: 20px;
      box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.25);
      padding: 32px;
    }
    <div class="wrap">
      <div class="item"></div>
      <div class="item"></div>
    </div>
    Login or Signup to reply.
  2. .wrap {
      display: flex;
      gap: 30px;
    }
    .item {
      padding: 30px;
      flex-basis: 382px;
      background: rgb(12,28,87);
      background: linear-gradient(156deg, rgba(12,28,87,1) 0%, 
      rgba(83,81,147,1) 100%);
      background-repeat: no-repeat;
      background-size: сontain;
      flex-basis: 382px;
      min-height: 218px;
      border-radius: 20px;
      box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.25);
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search