css+js圆环过渡动画图片幻灯片效果代码

代码语言:html

所属分类:幻灯片

代码描述:css+js圆环过渡动画图片幻灯片效果代码

代码标签: css js 圆环 过渡 动画 图片 幻灯片

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

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

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

  
  
<style>
@import url("https://fonts.googleapis.com/css?family=Playfair+Display:400,900");
* {
  outline: none;
}

html, body, main {
  width: 100%;
  height: 100%;
  margin: 0;
  color: white;
  font-family: "Playfair Display", serif;
}

body {
  background-color: #010101;
}
body:after {
  content: " ";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: #010101;
  opacity: 0.8;
  z-index: -1;
}
body .background {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -2;
  opacity: 1;
  transition: opacity 1s cubic-bezier(0.5, 0.3, 0.5, 0.8) 0.2s;
}
body .background.hide {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.5, 0.3, 0.5, 0.8) 0s;
}

main {
  position: relativ;
}
main > div {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}
main .menu {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  padding: 50px;
}
main .menu span:nth-of-type(2) {
  display: flex;
  justify-content: flex-end;
}
main .menu span:nth-of-type(3) {
  display: flex;
  align-items: flex-end;
}
main .hero {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
main .hero, main .hero .disk {
  display: flex;
  justify-content: center;
  align-items: center;
}
main .hero .disk {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background-color: #010101;
  overflow: hidden;
}
main .hero .disk:nth-of-type(1) {
  width: 1000px;
  height: 1000px;
}
main .hero .disk:nth-of-type(2) {
  width: 666px;
  height: 666px;
}
main .hero .disk:nth-of-type(3) {
  width: 333px;
  height: 333px;
}
main .hero .disk-content {
  width: 100%;
  height: 100%;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 120% auto;
  backface-visibility: hidden;
  clip-path: circle(100% at 50% 50%);
  transition: clip-path 1s cubic-bezier(0.5, 0.3, 0.5, 0.8), background-size 1s cubic-bezier(0.5, 0.3, 0.5, 0.8) 0s;
}
main .hero-text {
  position: absolute;
  width: 100%;
  height: 100%;
  font-size: 3rem;
}
main .hero-text > div {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
main .hero-text > div > span {
  position: absolute;
  display: block;
  transition: all 0.5s cubic-bezier(0.5, 0.3, 0.5, 0.8) 2.5s;
  transform: translateY(-200%);
  opacity: 0;
}
main .hero-text > div > span.selected {
  transform: translateY(0);
  opacity: 1;
}
main .hero-text > div > span.out {
  transform: translateY(200%);
  opacity: 0;
  transition-delay: 0s;
}
main .hero button {
  position: absolute;
  padding: 1.2rem 1.5rem;
  border: none;
  border-radius: 50%;
  background-color: white;
  font-size: 1.2rem;
  cursor: pointer;
}
main .hero button.button-prev {
  left: calc(50% - 500px);
  transform: translateX(-50%);
}
main .hero button.button-next {
  right: calc(50% - 500px.........完整代码请登录后点击上方下载按钮下载查看

网友评论0