Quantum levitation enabled by repulsive Casimir force has been a desire due to the potential exciting applications in passive-suspension devices and frictionless bearings. In this paper, dynamically tunable stable levitation is theoretically demonstrated based on the configuration of dissimilar gratings separated by an intervening fluid using exact scattering theory. The levitation position is insensitive to temperature variations and can be actively tuned by adjusting the lateral displacement between the two gratings. This work paves a way toward applying quantum Casimir interactions into macroscopic mechanical devices working in a noncontact and low-friction environment for controlling the position or transducing lateral movement into vertical displacement at the nanoscale., where d is the gap spacing, h is reduced Planck constant, c is the speed of light in vacuum [1]. Its magnitude increases quickly with decreasing gap spacing, and the corresponding pressure exerted is even larger than atmospheric pressure at d = 10 nm.This nontrivial long-range interaction will cause the malfunctioning of microelectromechanical systems (MEMS) and nanoelectromechanical systems (NEMS) due to the induced stiction and friction problems. As a result, it may impede on Moore's law, which says that the packing density of transistors doubles approximately every two years.The desire of overcoming the Casimir stiction has been one of the major driving forces for realizing repulsive force. Magnetic materials were introduced to achieve the Casimir