tornpaper实现边框撕纸撕开动画效果代码

代码语言:html

所属分类:动画

代码描述:tornpaper实现边框撕纸撕开动画效果代码

代码标签: tornpaper 边框 撕纸 撕开 动画

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

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

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

<style>
@import url("https://fonts.googleapis.com/css2?family=Asap&display=swap");
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
*::before,
*::after {
    box-sizing: border-box;
}
html,
body {
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    scroll-behavior: smooth;
}
body {
    font-family: "Asap", sans-serif;
    position: relative;
    width: 100%;
    min-height: 100vh;
    text-align: center;
    overflow-x: hidden;
    background: linear-gradient(
        135deg,
        rgba(222, 191, 244, 1) 0%,
        rgba(255, 178, 178, 1) 100%
    );
    color: dimgray;
    display: grid;
    place-items: center;
}
.wrap {
    filter: drop-shadow(0.3rem 0.3rem 0.2rem rgba(0, 0, 0, 0.3));
}
.paper {
    position: relative;
    width: min(320px, 80vw);
    height: auto;
    aspect-ratio: 1/1;
    display: grid;
    place-items: center;
    transform: translateZ(0);
    filter: url(#filter_tornpaper);
}
.shape {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background-color: white;
    -webkit-animation: anim 10s ease infinite;
            animation: anim 10s ease infinite;
}
@-webkit-keyframes anim {
    0%,
    100% {
        -webkit-clip-path: circle(50% at 70% 70%);
                clip-path: ci.........完整代码请登录后点击上方下载按钮下载查看

网友评论0