How does WeChat Mini Programs realize the flip effect?

The effect that

needs to achieve is similar to this demo
https://www.cnblogs.com/chenl.

.

I tried to rewrite him in Mini Program, but I could not change the style for many times.
I am a rookie, the front end is not good, I urgently ask for advice-worship on sharp membrane-sharp


Mini Program is the one that changes width and height is written in style , show , hide is also controlled by variables. You can change the part of the operation DOM to an operation variable


. Looking at the effect of your link, you can actually Boolean control, show and hide. As long as you know which one you click to give the current Boolean, you can use a loop to change

.
Menu