div+css实现立体上下折纸滚动幻灯片效果代码

代码语言:html

所属分类:幻灯片

代码描述:div+css实现立体上下折纸滚动幻灯片效果代码

代码标签: div cs 立体 上下 折纸 滚动 幻灯片

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

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

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

  
  
  
<style>
body {
  font-family: system-ui, sans-serif;
  display: grid;
  place-content: center;
  margin: 0;
  min-height: 100vh;
  background-color: #FBF7F4;
  background-image: linear-gradient(#E2363650 1px, transparent 1px), linear-gradient(to right, #E2363650 1px, #FBF7F4 1px);
  background-size: 1em 1em;
  perspective: 3000em;
  perspective-origin: center;
}

div {
  transform-style: preserve-3d;
  box-sizing: border-box;
}

.back {
  position: relative;
  width: 10em;
  height: 10em;
}
.back:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: -5.5ch;
  z-index: -1;
  background-image: linear-gradient(#0001 20%, #0005, #0001 80%);
  filter: blur(1ch);
}

.top, .btm {
  position: absolute;
  z-index: -1;
  width: 110%;
  height: 0.75em;
  left: -5%;
  background-color: #1f2020;
  border-radius: 100vmax;
  box-shadow: inset 3px 3px 0 #999, inset -3px -3px 0 #fffe, 0 0 2px 2px #0003;
}

.top {
  top: -3.9em;
}

.btm {
  top: 6.2em;
}

.cont {
  width: 10em;
  height: 3em;
  position: relative;
}

.ac {
  backface-visibility: hidden;
  position: absolute;
  width: 100%;
  height: 3em;
  top: 0;
  left: 0;
  display: grid;
  place-content: center;
  border: 1px solid #0003;
  border-radius: 0.35em;
  background-color: #F9F6EF;
  background-image: linear-gradient(90deg, #0000 20%, #fff, #0000 80%), linear-gradient(-135deg, #0000 80%, #1f202090 150%), radial-gradient(#fff 40%, #F9F6EF 80%, #EBEBE3);
  transform: rotatex(calc(var(--a) * 36deg)) translatez(5em);
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-weight: 900;
  color: #E2363680;
  text-shadow: 1px 1px 0 #eee, 0 0 0 #666;
}
.ac:before {
  position: ab.........完整代码请登录后点击上方下载按钮下载查看

网友评论0