在一个弹性元素悬停时更改大小并与另一个元素重叠

Change size on hover of one flex element with overlapping another

悬停一个弹性元素并与另一个元素重叠时更改大小。 像这样

你可以像这样使用CSS转换属性

selector {
  ... /* others styles */
  transition: 0.4s;
}
selector:hover {
  transform: scaleY(1.2)
}

参考https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale()

  <div class="flex justify-content-evenly align-items-start flex-wrap">
<div class="relative container w-full w-3 h-22rem">
  <div class="item-container grid inline absolute top-0 left-0">
    <div class="text-center col">
      <img class="w-full" src="assets/images/buket2.png" alt="buket">
    </div>

    <div class="col">
      <h5 class="m-0">Bouquet 117 (21 gerberas)</h5>
      <p class="text-400 text-sm font-medium mt-1">Fresh flowers</p>
      <p class="font-bold">€83.49 EUR</p>
    </div>
    <button label="Add to cart" icon="pi pi-shopping-cart">
    </button >
  </div>
</div>
.item-container {
  border: 1px solid #E7E7E7;
  box-sizing: border-box;
  border-radius: 10px;
  margin: 15px 0 15px 0;
  padding: 20px 20px 0 20px;
  background-color: white;

  &:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 2;

  .buy-btn {
    display: block !important;
   }
  }
}