css3实现随机数字

img:hover {
-webkit-transform: rotate( random(-5, 5)deg); // generate a random number between -5 and +5
-moz-transform: rotate( random(-5, 5)deg); // generate a random number between -5 and +5
}

你可能感兴趣的:(CSS3)