在这里,我采用我的CSS想法。div img {
position:absolute;
opacity:0;
transition:0s 180s;}div:hover img {
opacity:1;
transition:0s;}div {
line-height:1.2em;
font-size:1em;
color:black;
transition:0s 180s;}div:hover {
line-height:0;
font-size:0;
color:transparent;
transition:0;}
标记:
some text to hover to see an image wich is hidden as you read this
div:hover img:focus {/* includes tabindex in html tag for img */
opacity:0;
transition:3s;
-webkit-transform:rotate(-360deg) scale(0.23);
-webkit-transform:rotate(-360deg) scale(0.23);
-moz-transform:rotate(-360deg) scale(0.23);
-o-transform:rotate(-360deg) scale(0.23);
-ms-transform:rotate(-360deg) scale(0.23);
transform:rotate(-360deg) scale(0.23);}