<!DOCTYPE html>
<html>
<head>
<style>
#div1 {
position: relative;
margin: auto;
height: 150px;
width: 250px;
padding: 10px;
border: 1px solid black;
perspective: 125px;
animation: mymove 5s infinite;
}
@keyframes mymove {
50% {perspective-origin: 10px 50%;}
}
#div2 {
padding: 50px;
position: absolute;
border: 1px solid black;
background-color: coral;
transform: rotateX(45deg);
}
</style>
</head>
<body>
<h1>perspective-origin 的动画效果:</h1>
<div id="div1">DIV1
<div id="div2">DIV2</div>
</div>
<p><b>注释:</b>CSS 动画在 Internet Explorer 9 以及更早版本中不起作用。</p>
</body>
</html>