Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 !

like image 360
Alex Oger Avatar asked Aug 29 '15 14:08

Alex Oger


1 Answers

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

like image 130
Alex Oger Avatar answered Nov 02 '22 23:11

Alex Oger