We use the newly published 28 observational Hubble parameter data ($H(z)$) and current largest SNe Ia samples (Union2.1) to test whether the universe is transparent. Three cosmological-model-independent methods (nearby SNe Ia method, interpolation method and smoothing method) are proposed through comparing opacity-free distance modulus from Hubble parameter data and opacity-dependent distance modulus from SNe Ia . Two parameterizations, $tau(z)=2epsilon z$ and $tau(z)=(1+z)^{2epsilon}-1$ are adopted for the optical depth associated to the cosmic absorption. We find that the results are not sensitive to the methods and parameterizations. Our results support a transparent universe.