Recently superconductivity and topological charge-density wave (CDW) were discovered in the Kagome metals AV3Sb5 (A = Cs, Rb, and K), which have an ideal Kagome lattice of vanadium. Here we report resistance measurements on thin flakes of CsV3Sb5 to investigate the evolution of superconductivity and CDW with sample thickness. The CDW transition temperature TCDW decreases from 94 K in bulk to a minimum of 82 K at thickness of 60 nm, then increases to 120 K as the thickness is reduced further to 4.8 nm (about five monolayers). Since the CDW order in CsV3Sb5 is quite three-dimensional (3D) in the bulk sample, the non-monotonic evolution of TCDW with reducing sample thickness can be explained by a 3D to 2D crossover around 60 nm. Strikingly, the superconducting transition temperature Tc shows an exactly opposite evolution, increasing from 3.64 K in the bulk to a maximum of 4.28 K at thickness of 60 nm, then decreasing to 0.76 K at 4.8 nm. Such exactly opposite evolutions provide strong evidence for competing superconductivity and CDW, which helps us to understand these exotic phases in AV3Sb5 Kagome metals.