HTML5前端开发入门之CSS 2D转换模块实战

效果图:

 代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2D转换模块案例实战</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            width: 310px;
            height: 432.45px;
            border: 1px solid #000;
            background-color: skyblue;
            margin: 100px auto;
            perspective: 500px;
        }
        div img{
            width: 310px;
            transform-origin: bottom;
            transition: transform 2s;
        }
        div:hover img{
            transform: rotateX(80deg);
        }
    </style>
</head>
<body>
<div>
    <img src="../images/pk.png" alt="">
</div>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_41886761/article/details/86078247