locomotive实现差异横向滚动画册画廊效果代码

代码语言:html

所属分类:幻灯片

代码描述:locomotive实现差异横向滚动画册画廊效果代码

代码标签: 横向 滚动 画册 画廊 效果

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

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

<head>

  <meta charset="UTF-8">
  

  
<style>
html,
body {
  height: 100%;
  background: #eee;
}
body {
  overflow: hidden;
}
.scroll-animations-example > .scrollsection {
  padding: 10vh 10vh 10vh 10vmax;
  min-width: 550vh;
}
.scroll-animations-example > .scrollsection > .item {
  display: inline-block;
  position: relative;
  margin: 0 -30vh 0 3vh;
}
.scroll-animations-example > .scrollsection > .item::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}
.scroll-animations-example > .scrollsection > .item.-big {
  height: 80vh;
  width: 60vh;
}
.scroll-animations-example > .scrollsection > .item.-big.-horizontal {
  height: 60vh;
  width: 80vh;
}
.scroll-animations-example > .scrollsection > .item.-normal {
  height: 60vh;
  width: 45vh;
  z-index: 1;
}
.scroll-animations-example > .scrollsection > .item.-normal.-horizontal {
  height: 45vh;
  width: 60vh;
}
.scroll-animations-example > .scrollsection > .item.-normal:nth-of-type(3n) {
  bottom: 5vh;
}
.scroll-animations-example > .scrollsection > .item.-normal:nth-of-type(4n) {
  bottom: -5vh;
}
.scroll-animations-example > .scrollsection > .item.-small {
  height: 40vh;
  width: 30vh;
  z-index: 2;
}
.scroll-animations-example > .scrollsection > .item.-small.-horizontal {
  height: 30vh;
  width: 40vh;
}
.scroll-animations-example > .scrollsection > .item.-small:nth-of-type(3n) {
  bottom: 13vh;
}
.scroll-animations-example > .scrollsection > .item.-small:nth-of-type(4n) {
  bottom: -13vh;
}
.scroll-animations-example > .scrollsection > .item > .image {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  filter: grayscale(1);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) translateY(0) scale(1);
  transition: filter 0.3s ease, opacity 1s ease, transform 1s ease;
}
.scroll-animations-example > .........完整代码请登录后点击上方下载按钮下载查看

网友评论0