three实现360度全景视觉差异页面滚动效果代码

代码语言:html

所属分类:视觉差异

代码描述:three实现360度全景视觉差异页面滚动效果代码,鼠标滚动页面,发现背景图也在360度全景旋转。

代码标签: three 360度 全景 视觉 差异 页面 滚动

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
 
<meta charset="UTF-8">

 
 
<style>
@import url("https://fonts.googleapis.com/css2?family=Asap&display=swap");
* {
  margin: 0;
  padding: 0;
}
html,
body {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}
html {
  font-size: max(18px, 2.5vw);
}
body {
  font-family: "Asap", sans-serif;
  position: relative;
  top: 0;
  left: 0;
  width: 100vw;
  min-height: 100vh;
  text-align: center;
  color: white;
  overflow-x: hidden;
}
a {
  color: white;
}
#container {
  position: relative;
  z-index: 0;
}
canvas {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
}

section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 100vh;
  margin: 3vw 0;
  z-index: 1;
}
h1,
h2 {
  filter: drop-shadow(0 0 2px black);
}
h1 {
  font-size: 2rem;
}
h2 {
  margin: 1rem 0;
}
.sample_wrap {
  margin: 3rem 0;
}
.sample_img {
  display: inline-block;
  margin: 0 1rem;
}
.img {
  width: 3.........完整代码请登录后点击上方下载按钮下载查看

网友评论0