Actually, only Rehnquist voted to uphold the whole law. The majority struck down two provisions (one banning using adults to play children, and the other banning "virtual" images of children), and O'Connor and Scalia voted to strike down the first of those but not the second.
Kennedy, J., delivered the opinion of the Court, in which Stevens, Souter, Ginsburg, and Breyer, JJ., joined. Thomas, J., filed an opinion concurring in the judgment. OConnor, J., filed an opinion concurring in the judgment in part and dissenting in part, in which Rehnquist, C.J., and Scalia, J., joined as to Part II. Rehnquist, C.J., filed a dissenting opinion, in which Scalia, J., joined except for the paragraph discussing legislative history.
See people dont get this. The law made the depiction of Dennis Quaid and Wynona Rider(who was portraying a 13-year old) having sex in "Great Balls of Fire" a criminal act. This would be true to a great deal of movies or books. Thats absurd.