html
<div>
<img src="https://api.btstu.cn/sjbz/api.php?method=mobile&1">
<img src="https://api.btstu.cn/sjbz/api.php?method=mobile&2">
<img src="https://api.btstu.cn/sjbz/api.php?method=mobile&3">
<img src="https://api.btstu.cn/sjbz/api.php?method=mobile&4">
<img src="https://api.btstu.cn/sjbz/api.php?method=mobile&5">
<img src="https://api.btstu.cn/sjbz/api.php?method=mobile&6">
</div>
css
div {
width:200px;
height:400px;
position:relative;
margin:500px auto;
}
div img {
width:200px;
height:400px;
position:absolute;
top:0;
left:0;
transition:all 0.6s;
/* 旋转过度*/
transform-origin:top right;
/* 旋转角度*/
}
div:hover img:nth-child(1) {
transform:rotate(60deg);
}
div:hover img:nth-child(2) {
transform:rotate(120deg);
}
div:hover img:nth-child(3) {
transform:rotate(180deg);
}
div:hover img:nth-child(4) {
transform:rotate(240deg);
}
div:hover img:nth-child(5) {
transform:rotate(300deg);
}
div:hover img:nth-child(6) {
transform:rotate(360deg);
}
评论