<div class="seaside">
  <img src="https://lenadesign.org/wp-content/uploads/2021/07/brighton-1.jpg" alt="Brighton">
</div>
body {
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
}

.seaside {
  position: relative;
  top:0;
  left:0;
  overflow: hidden;
  width: 450px;
  height: 350px;
  box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
}

.seaside img {
  width: 450px;
  height: 350px;
  position: relative;
  transition: .3s;
}

.seaside:before {
  position: absolute;
  content:"Sea Side";
  font-size: 60px;
  color: white;
  font-family: tahoma;
  background-color: rgba(69,123,157,0.4);
  text-shadow: 5px 5px 10px rgba(0,0,0,0.5);
  z-index:1;
  width: 450px;
  height: 350px;
  align-items: center;
  justify-content: center;
  display: flex;
  opacity:0;
  transition: .2s;
}

.seaside:hover:before {
  opacity:1;
}

.seaside:hover img {
  transform: scale(1.5);
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.