User 247a2c5018
21-05-2015 08:27:36
ChemAxon 76c88f5366
21-05-2015 09:27:14
User 870ab5b546
22-05-2015 10:04:18
Hey, where is the code that is responsible for that cool little rotation and magnification effect upon mousing over an image?
ChemAxon 996dedebe0
22-05-2015 12:54:50
Hi, it is set from css:
.image-container img{
background-color: transparent;
box-shadow: 2px 2px 8px #444;
transform:rotate(0deg);
-ms-transform:rotate(0deg); /* Internet Explorer */
-moz-transform:rotate(0deg); /* Firefox */
-webkit-transform:rotate(0deg); /* Safari and Chrome */
-o-transform:rotate(0deg); /* Opera */
-webkit-transition: -webkit-transform 0.2s linear 0s;
-moz-transition: -moz-transform 0.2s linear 0s;
-o-transition: -o-transform 0.2s linear 0s;
transition: transform 0.2s linear 0s;
}
.image-container img:hover{
background-color: white;
box-shadow: 2px 2px 8px #444;
transform:scale(1.05) rotate(3deg);
-ms-transform:scale(1.05) rotate(3deg); /* Internet Explorer */
-moz-transform:scale(1.05) rotate(3deg); /* Firefox */
-webkit-transform:scale(1.05) rotate(3deg); /* Safari and Chrome */
-o-transform:scale(1.05) rotate(3deg); /* Opera */
-webkit-transition: -webkit-transform 0.2s linear 0s;
-moz-transition: -moz-transform 0.2s linear 0s;
-o-transition: -o-transform 0.2s linear 0s;
transition: transform 0.2s linear 0s;
}
Here you can find more info about it: http://www.w3schools.com/css/css3_transitions.asp
Regards,
Janos