div+js实现可滚动曲面相册画廊效果代码

代码语言:html

所属分类:画廊相册

代码描述:div+js实现可滚动曲面相册画廊效果代码,悬浮可放大。

代码标签: div js 滚动 曲面 相册 画廊

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

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

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

  
  
  
<style>
* {
  box-sizing: border-box;
}

body {
  background-color: darkblue;
  margin: 0;
}

.curved-grid {
  list-style: none;
  margin: 20px;
  padding-inline-start: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  --x: 60;
  --y: 100;
  transform-style: preserve-3d;
  perspective: calc(var(--x) * 1vw);
  perspective-origin: center;
  animation: animate-perspective-origin linear 2s;
  animation-play-state: paused;
  animation-delay: calc(var(--scroll, 0) * -1s);
  animation-iteration-count: 1;
  animation-fill-mode: both;
}
@supports (animation-timeline: view()) {
  .curved-grid {
    animation: animate-perspective-origin-timeline linear 2s;
    animation-play-state: revert;
    animation-ti.........完整代码请登录后点击上方下载按钮下载查看

网友评论0