All-inorganic cesium-lead-halide CsPbX3 (X = Cl, Br, and I) perovskite nanocrystals (NCs) have attracted great attention due to their outstanding photoelectric properties in recent years. However, the unsatisfactory optical stability and undesirable anion-exchange reaction between different halides of perovskite NCs seriously hinder their further development and application in optoelectronic devices. Herein, the intermediate stages during anion-exchange processes between as-prepared perovskite NCs after mixing into solution and film were respectively studied and characterized by using photoluminescence and electroluminescence (EL) spectroscopy. In our case, the physical collision and solvent bridge effect together affect the anion-exchange reaction of the mixed solution, while the physical collision mechanism is dominant in the mixed film. More importantly, a thin polystyrene layer was inserted between CsPbBr3 and CsPbI3 to efficiently prevent the halogen anion-exchange reaction. Color-tunable EL performance and stable white emission were successfully achieved by employing the optimized CsPbI3/PS/CsPbBr3 structures onto the blue-violet heterojunctions.