Large-area crack-free 2D and 3D WO 3 inverse opal (IO) films, using a wide range of sizes of sacrificial PS spheres as colloidal crystal template, were fabricated by “dynamic hard template infiltration strategy”. First a dynamic PS opal film was formed floating on the surface of water followed by infiltration of a preformed WO 3 sol underneath the PS opal film. The resultant PS/WO 3 opal composite film was then deposited on various types of substrates (rigid and flexible) and 2D WO 3 IO films were obtained following the removal of the PS template by chemical method. Based on this strategy, multiple layer WO 3 IOs were fabricated through a layer by layer route. The WO 3 IO films deposited on indium tin oxide coated conductive (ITO) substrates were used as active electrode in the fabrication of electrochromic devices, demonstrating their advanced properties for electrochromic application.