Cố gắng lật hình ảnh để hiển thị 4 cách: ban đầu (không thay đổi), lộn theo chiều ngang, lật theo chiều dọc, lật theo chiều ngang + theo chiều dọc.Lật/phản chiếu hình ảnh theo chiều ngang + theo chiều dọc với css
Để làm điều này Im làm như dưới đây, nó hoạt động tốt ngoài việc lật theo chiều ngang + theo chiều dọc, bất kỳ ý tưởng tại sao điều này sẽ không hoạt động?
Ive đã fiddle JS của vấn đề ở đây: https://jsfiddle.net/7vg2tn83/
.img-hor {
-moz-transform: scaleX(-1);
-o-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
filter: FlipH;
-ms-filter: "FlipH";
}
.img-vert {
-moz-transform: scaleY(-1);
-o-transform: scaleY(-1);
-webkit-transform: scaleY(-1);
transform: scaleY(-1);
filter: FlipV;
-ms-filter: "FlipV";
}
.img-hor-vert {
-moz-transform: scaleX(-1);
-o-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
filter: FlipH;
-ms-filter: "FlipH";
-moz-transform: scaleY(-1);
-o-transform: scaleY(-1);
-webkit-transform: scaleY(-1);
transform: scaleY(-1);
filter: FlipV;
-ms-filter: "FlipV";
}
cảm ơn - tôi thử nghiệm trong IE9, bạn đã đúng dường như không làm việc – sam
Đối với IE9, bạn có thể sử dụng '-ms-transform: scale (-1, -1);' – Victor