three打造3D幕布垂帘撩动交互效果
代码语言:html
所属分类:三维
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat'>
<style>
body {
margin: 0;
height: 100%;
font-family: 'Montserrat', sans-serif;
background-image: radial-gradient(circle, #ffffff, #aaaaaa);
}
canvas {
position: fixed;
top: 0;
bottom: 0;
z-index: 1;
}
h1 {
font-size: 50px;
text-align: center;
width: 60%;
margin: 0 auto;
padding-top: 10%;
}
p {
font-size: 30px;
text-align: center;
width: 50%;
margin: 1em auto 0;
}
</style>
</head>
<body translate="no">
<canvas id="canvas"></canvas>
<h1>What's behind the curtain ?</h1>
<p>This funny interactive curtain is made with ThreeJS, polylines and verlet constraints (adapted from verlet-js).</p>
<script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/three.109.js.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0