We report a systematic study of the influence of the target-substrate distance and rf power on the structural and optical properties of ZnO thin films grown by rf magnetron sputtering in Ar atmosphere from ZnO sputtering target. Sharp (002) peak showed by XRD indicates a c-axis crystalline growth of ZnO films. Growth rate remained almost constant for short target-substrate distances. However, the grain size increases with the rf power decreasing the compressive stress in ZnO films. As-grown ZnO films have average transmittance more than 80% in the visible region. Optical bandgap (Eg ) increases from 3.18 to 3.27 eV as increase the target-substrate distance probably due to low stress compression in ZnO films. In addition, when rf power is above 100 W, the optical band gap increases as increase of the stress compression.