效果图
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3d旋转title>
<style>
*{
padding:0;
margin:0;
font-family:'poppins',sana-serif;
}
body{
display:flex;
justify-content:center;
align-items:center;
background:#16384c;
}
.container{
position:relative;
width:1100px;
display:flex;
justify-content:center;
align-items:center;
flex-wrap:wrap;
padding:30px;
}
.container .card{
position:relative;
max-width:250px;
height:250px;
background:#fff;
margin:30px 10px;
padding:20px 15px;
display:flex;
flex-direction:column;
box-shadow:0 5px 202 px rgba(0,0,0,0.5);
transition:0.3s ease-in-out;
}
.container .card:hover{
height:420px;
}
.container .card .imgBx{
position:relative;
width:200px;
height:380px;
top:-50px;
left:20px;
z-index:1;
box-shadow:0 5px 20px rgba(0,0,0,0.2);
}
.container .card .imgBx img{
max-width:100%;
border-radius:4px;
}
.container .card .content{
position:relative;
margin-top:-10px;
padding:10px 15px;
text-align:center;
color:#111;
visibility:hidden;
opacity:0;
transition:0.3s ease-in-out;
}
.container .card:hover .content{
visibility:visible;
opacity:1;
margin-top:-40px;
margin-top-delay:0.3s;
}
style>
<script>
script>
head>
<body>
<div class="container">
<div class="card">
<div class='imgBx'>
<img src="img/1.png">
div>
<div class="content">
<h2>Card Crazyh2>
<p>guewfyb1i1h92hhufbubf,usd9qwhd9db91be12h0hw0qbp
hciubduhw8dhhdbuw.
p>
div>
div>
div>
<div class="container">
<div class="card">
<div class='imgBx'>
<img src="img/2.png">
div>
<div class="content">
<h2>Card Crazyh2>
<p>guewfyb1i1h92hhufbubf,usd9qwhd9db91be12h0hw0qbp
hciubduhw8dhhdbuw.
p>
div>
div>
div>
<div class="container">
<div class="card">
<div class='imgBx'>
<img src="img/3.png">
div>
<div class="content">
<h2>Card Crazyh2>
<p>guewfyb1i1h92hhufbubf,usd9qwhd9db91be12h0hw0qbp
hciubduhw8dhhdbuw.
p>
div>
div>
div>
body>
html>