CSS 3 animation “transform: scale” on column element doesn't work on chrome

放肆的年华 提交于 2019-12-01 03:46:38

问题


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;
    }

here is a demo : http://codepen.io/anon/pen/YyKgyW

thanks

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 !


回答1:


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



来源:https://stackoverflow.com/questions/32287243/css-3-animation-transform-scale-on-column-element-doesnt-work-on-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!