+
96
-

回答

看这个例子

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>视觉差滚动</title>

<style>
* {
margin: 0;
padding: 0;
}
.g {
height: 50vh;
background: green;
}

#cont {
width: 100vw;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
perspective: 1px;
}
.box {
transform-style: preserve-3d;
}

.vision {
height: 50vh;
transform: translateZ(-1px) scale(4);
}
.img {
width: 100%;
height: auto;

}
</style>
</head>
<body>
<div id="cont">
<div class="box">
<div class="vision">
<img class="img" src='http://repo.bfw.wiki/bfwrepo/image/5d65ea7d8bc8b.png' />
</div>
<div class="g"> </div>

</div>
</div>
<script>
</script>
</body>
</html>


网友回复

我知道答案,我要回答