滚动图像会将其下方的所有内容向下移动

问题描述 投票:0回答:1
html css twitter-bootstrap rollover
1个回答
1
投票

这里是 CSS 代码,用于防止当您将鼠标悬停在图像上时标题向下移动。

.image-rollover2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.image-rollover1:hover + .image-rollover2 {
  opacity: 1;
}
© www.soinside.com 2019 - 2024. All rights reserved.