Minecraft wiki entry for Things_to_do_when_bored, associated text: Did you know that you can make mobs fly by repeatedly punching them while they have slow falling and regeneration? Probably not! Here is how!
Step 1: Type in the command /summon minecraft:pig ~ ~ ~. This will summon a pig.
Step 2: Type in the command /effect @e[type=minecraft:pig] slowness 500 100. This will prevent the pig from moving.
Step 3: Type in the command /effect @e[type=minecraft:pig] slow_falling 500 3. This will prevent the pig from falling at a normal speed and will instead fall slowly.
Step 4: Type in the command /effect @e[type=minecraft:pig] regeneration 500 100. This will make the pig regenerate almost instantly after every punch.
Step 5: Type in the command /effect @s speed 500 2. The speed will make you reach the pig. If you don't type in the command, then you wouldn't reach the pig to punch it anymore and it would likely touch the ground before you would even hit it.
Step 6: Begin punching the pig with an empty fist. Once you've started punching, don't stop. After a few hits, you will notice that the pig is in mid-air while you keep punching it to constantly be in that state, looking like it's flying. How long can you keep hitting until the pig touches the ground?