效果示意图
图中,我实现的效果是 当鼠标悬停在图片上面时,图片将围绕下边界旋转90度
代码示例:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{
margin: 0;
padding: 0;
}
div{
width: 300px;
height: 350px;
margin: 0 auto;
/*设置盒子居中显示*/
background-color: skyblue;
padding-top: 150px;
/*内边距 (div标签)*/
/*border: 1px solid black;*/
text-align: center;
perspective: 350px;
}
div img{
transition: all 3s;
transform-origin: bottom;
}
div img:hover{
transform:rotateX(90deg) ;
}
</style>
</head>
<body>
<div>
<img src="img/angel2.jpeg" width="250px" height="350px"/>
</div>
</body>
&l