麻烦老师查看作业,谢谢。
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
width: 250px;
height: 250px;
margin: 10px auto;
perspective: 1000px;
}
.box1 img {
width: 200px;
height: 200px;
border: 1px solid black;
border-radius: 50%;
}
.box1 img.dog {
position: absolute;
top: 0;
left: 0;
transform-origin: 0 0;
transition: transform 1s ease 0s;
}
.box1:hover img.dog {
transform: rotateY(-180deg);
}
.box2 img {
width: 200px;
height: 200px;
border: 1px solid black;
border-radius: 50%;
}
.box2 img.dog {
position: absolute;
top: 0;
left: 0;
transform-origin: 100px 0;
transition: transform 1s ease 0s;
}
.box2:hover img.dog {
transform: rotateY(-180deg);
}
.box3 img {
width: 200px;
height: 200px;
border: 1px solid black;
border-radius: 50%;
}
.box3 img.dog {
position: absolute;
top: 0;
left: 0;
transform-origin: 100px 200px;
transition: transform 1s ease 0s;
}
.box3:hover img.dog {
transform: rotateX(-180deg);
}
</style>
</head>
<body>
<div class="box box1">
<img class="cat" src="../images/cat.jpg" alt="cat">
<img class="dog" src="../images/dog.jpg" alt="dog">
</div>
<div class="box box2">
<img class="cat" src="../images/cat.jpg" alt="cat">
<img class="dog" src="../images/dog.jpg" alt="dog">
</div>
<div class="box box3">
<img class="cat" src="../images/cat.jpg" alt="cat">
<img class="dog" src="../images/dog.jpg" alt="dog">
</div>
</body>
</html>11
收起
正在回答 回答被采纳积分+1
1回答




恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星