gsap实现消息纸张滚动卷起动画效果代码

代码语言:html

所属分类:加载滚动

代码描述:gsap实现消息纸张滚动卷起动画效果代码

代码标签: 纸张 滚动 卷起 动画 效果

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

<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css">

<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Poppins:wght@400;500;600;700&amp;display=swap'>
<style>
    #phone {
  --c-frame: black;
  --c-interface: black;
  --c-headline: black;
  --c-screen: #e4e2e2;
  --c-letter: #fff;
  --c-date: black;
  --c-subline: #898989;
  --c-text: #A7A7A7;
  --empty-mask: 100%;
  --headline-y: 0;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  width: 375px;
  color: var(--c-interface);
}
@media (min-width: 501px) {
  #phone {
    border-radius: 9.6%/4.43%;
    box-shadow: 0 0 0 10px var(--c-frame);
  }
  #phone:before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 30px;
    width: 200px;
    border-radius: 0 0 16px 16px;
    background: var(--c-frame);
  }
}
#phone .time,
#phone .battery,
#phone .cellular,
#phone .wifi {
  position: absolute;
  top: 17px;
}
@media (max-width: 500px) {
  #phone .time,
#phone .battery,
#phone .cellular,
#phone .wifi {
    display: none;
  }
}
#phone .time {
  left: 21px;
  top: 15px;
  font-size: 100%;
  font-weight: 600;
}
#phone .battery {
  right: 15px;
  width: 25px;
  height: 12px;
}
#phone .cellular {
  right: 64px;
  width: 18px;
  height: 12px;
}
#phone .wifi {
  right: 44px;
  width: 16px;
  height: 12px;
}
#phone .screen {
  position: relative;
  width: 100%;
}
@media (min-width: 501px) {
  #phone .screen {
    padding-bottom: 216.533333333%;
    background: var(--c-screen);
    transform: translateZ(0);
    border-radius: 36px;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }
}
@media (max-width: 500px) {
  #phone .screen {
    height: 100vh;
  }
}
#phone .screen h1 {
  font-size: 30px;
  font-family: "DM Serif Display", .........完整代码请登录后点击上方下载按钮下载查看

网友评论0