html code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css book</title>
<style>
body {
background: #000;
display: flex;
justify-content: center;
}
.book {
position: absolute;
top: 50%;
transform: translate(0, -50%);
width: 300px;
height: 400px;
background: #fff;
transform-style: preserve-3d;
perspective: 2000px;
box-shadow: inset 300px 0 30px rgba(0,0,0,.5),
0 20px 100px rgba(0,0,0,.5);
transition: 2s;
}
.book:hover {
box-shadow: inset 10px 0 30px rgba(0,0,0,.3),
0 20px 100px rgba(0,0,0,.3);
transform: translate(-25%, -50%) rotate(-10deg);
}
.book::before