简体   繁体   中英

how to flip an image vertically at its position using css with smooth transition?

I have to flip my image vertically (ie is rotateX ) with smooth transition after few minutes at its center position. My image ois flipping but the problem is that its not fliiping on its position. Its flipping from the points somewhere above the image. I need to flip it with its center. I have tried all the rotating coordinates but its not working. Please help me

Here is my JsFiddle. you can find my codes here.

https://jsfiddle.net/bh7x7weg/

Thanks !!!!

Your images origin needs to be set to transform-origin: center center; Read here for more information about this style.

https://jsfiddle.net/bh7x7weg/3/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM