<div class="card-container">
  <div class="card glass" onmouseover="cardHover1()" onmouseout="mouseOut()">
    <div class="card-content">
      <h2>Sydney</h2>
      <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
      <button>View</button>
    </div>
    <div class="image shadow" style="background-image: url('https://images.unsplash.com/photo-1549180030-48bf079fb38a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=654&q=80');"></div>
  </div>
  <div class="card glass" onmouseover="cardHover2()" onmouseout="mouseOut()">
    <div class="card-content">
      <h2>Tokyo</h2>
      <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
      <button>View</button>
    </div>
    <div class="image shadow" style="background-image: url('https://images.unsplash.com/photo-1536098561742-ca998e48cbcc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1072&q=80');"></div>
  </div>
  <div class="card glass" onmouseover="cardHover3()" onmouseout="mouseOut()">
    <div class="card-content">
      <h2>New York</h2>
      <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
      <button>View</button>
    </div>
    <div class="image shadow" style="background-image: url('https://images.unsplash.com/photo-1518798495352-92ac911fc5fe?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80');"></div>
  </div>
</div>
// Font
body{
  font-family: 'Raleway', sans-serif;
}


// glass and shadow utill classes
.glass{
  border-radius: 1em;
  backdrop-filter: blur(10px);
  box-shadow: 10px 10px 50px rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.5);
  border-left: 1px solid rgba(255,255,255,0.5);
}
.shadow{
  box-shadow: 10px 10px 50px rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.5);
  border-left: 1px solid rgba(255,255,255,0.5);
}
// body style
body{
	height: 100vh;
	width: 100vw;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	transition: ease-in-out 0.5s;
	background-image: url('https://images.unsplash.com/photo-1528791075103-b149f525eb22?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80');
}
// Card styles
body{
  display: flex;
    justify-content: center;
    align-items: center;
    .card-container{
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 3em;
      .card{
        text-align: center;
        height: 30em;
        width: 20em;
        display: flex;
        align-items: center;
        justify-content: space-around;

        transition: ease-in-out 0.2s;

        .image{
          position: absolute;
          background-color: #778899;
          border-radius: 10px;
          opacity: 0;
          transition: ease-in-out 0.5s;
        }

        &:hover{
          width: 40em;
          text-align: left;
          transition: ease-in-out 0.2s;
            .image{
              display: block;
              position: relative;
              opacity: 1;
              width: 15em;
              height: 25em;
              background-position: center;
              background-size: cover;
            }
        }
        .card-content{
          padding: 20px;
          h2{
            font-size: 40px;
          }
          p{
            font-size: 20px;
						width: 10em;
          }
          button{
            font-size: 20px;
            font-weight: 100;
            border: 0;
            border-radius: 5px;
            background-color: black;
            padding: 4px 10px 4px 10px;
            color: white;
            margin-top: 20px;
          }
        }
      }
    }
}
View Compiled


function cardHover1() {
  document.body.style.backgroundImage = "url('https://images.unsplash.com/photo-1506973035872-a4ec16b8e8d9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80')"
	};
function cardHover2() {
  document.body.style.backgroundImage = "url('https://images.unsplash.com/photo-1513407030348-c983a97b98d8?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1744&q=80')"
	};
function cardHover3() {
  document.body.style.backgroundImage = "url('https://images.unsplash.com/photo-1499092346589-b9b6be3e94b2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1742&q=80')"
	};

function mouseOut() {
  document.body.style.backgroundImage = "url('https://images.unsplash.com/photo-1528791075103-b149f525eb22?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80')";
};
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.