CSS 3动画“transform:scale” on列元素在Chrome上不起作用 [英] CSS 3 animation "transform: scale" on column element doesn't work on chrome

查看:571
本文介绍了CSS 3动画“transform:scale” on列元素在Chrome上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题在Chrome v44,我试图放大在列的项目与transform:scale(1.1),动画不工作...的图像...如果我尝试firefox它工作很好!我想问题是由于铬,但我想知道是否有人找到了解决方法。

I encounter an issue in Chrome v44, I tried to zoom in on the image in item of column with a "transform: scale(1.1)", the animation doesn't work… And if I try on firefox it works well! I think the problem is due to chrome but I'd like to know if someone found a workaround.

    .column-wrap {
      columns: 3;
    }

    .column-item {
      background-color: red;
    }

    .column-img-wrap {
      margin: 0;
      overflow: hidden;
    }

    .column-img {
      display: block;
      max-width: 100%;
      height: auto;
      transform: scale(1);
      transition: transform .3s ease;
    }

    .column-img:hover {
      transform: scale(1.1);
      transition: transform .3s ease;
    }

这里是一个演示: http://codepen.io/anon/pen/YyKgyW

感谢

EDIT :我找到了一个解决方法:-webkit-backface-visibility:hidden;我在图像包装类.column-img-wrap和图像类.column-img上添加这个属性,并且它完美地工作了!

EDIT: I found a workaround: -webkit-backface-visibility: hidden; I add this property on image wrapper class ".column-img-wrap" and the image class ".column-img" and it works perfectly !

推荐答案

我发现了一个解决方法:-webkit-backface-visibility:hidden;我在图像包装类.column-img-wrap和图像类.column-img上添加这个属性,它可以完美地工作!

I found a workaround: -webkit-backface-visibility: hidden; I add this property on image wrapper class ".column-img-wrap" and the image class ".column-img" and it works perfectly !

.column-img-wrap {
  margin: 0;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
}

.column-img {
  display: block;
  max-width: 100%;
  transform: scale(1);
  transition: transform .3s ease;
  -webkit-backface-visibility: hidden;
}

demo http://codepen.io/nielk/pen/gaOaVz

这篇关于CSS 3动画“transform:scale” on列元素在Chrome上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆