1

这是下面代码的问题。我想用 css 创建类似缩放的效果。我在某些事件上使用 jquery 添加类 zoomIn 或 zoomOut,这现在并不重要。

问题在于,在 Chrome 和 Safari(基于 webkit)中,放大和缩小从 0 开始。例如,在 Firefox 中,过渡从当前图像高度开始,在这种情况下延伸到 1160 像素。然而,webkit 浏览器似乎处理不同的事情并开始从 0 到 1160px 的转换

我没有聪明的方法来解决这个问题,所以请帮忙

干杯

图像还有一类“完整”

.full       {display:block;position:absolute;width:100%;top:0;left:0;}

.zoomIn{ 
 top:0;left:0;
 box-sizing: border-box;
  -webkit-transition: all 0.2s ease-in; 
  -o-transition: all 0.2s ease-in; 
  -moz-transition: all 0.2s ease-in; 
  transition: all 0.2s ease-in; 
  height: 1160px !important;
  left: 50%;
  margin-left: -960px !important;
  margin-top: -670px !important;
  top: 50%;
  width: 1920px;
  -webkit-transform: scale(1.2);
  -moz-transform: scale(1.2);
  -o-transform: scale(1.2);
  transform: scale(1.2);
  -ms-transform: scale(1.2);

  }

.zoomOut { 
  -webkit-transition: all 0.2s ease-in; 
   -o-transition: all 0.2s ease-in;  
   transition: all 0.2s ease-in; 
   -moz-transition: all 0.2s ease-in; 
   -moz-transform: scale(1);
   margin-left: 0 ;margin-top: 0;
   -webkit-transform: scale(1);
   -o-transform: scale(1);
   transform: scale(1);
   -ms-transform: scale(1);

  }
4

0 回答 0