div+css实现饼状扇形切割文字背景动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现饼状扇形切割文字背景动画效果代码,饼状展开扇形折叠背景,显示文字动画。

代码标签: div css 饼状 扇形 切割 文字 背景 动画

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

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

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

 
 
 
<style>
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@500&family=Roboto+Condensed:wght@700&display=swap");

:root {
        --col1: #05299e;
        --col2: #5e4ae3;
        --col3: #947bd3;
        --col4: #ffb7ff;
        --col5: #ff595e;
}

body {
        height: 100vh;
        margin: 0px;
        display: grid;
        place-items: center;
        background-color: #000;
}
.large {
        width: 70vmin;
        height: 70vmin;
        position: absolute;
        transform-origin: bottom left;
}
#qc-peek-wrapper {
        translate: -100% 0px;
        overflow: hidden;
}
.quarter-circle {
        border-top-right-radius: 100%;
}
#qc-peek-wrapper > .quarter-circle {
        translate: 100% 0px;
}
#qc-peek-wrapper > .quarter-circle:nth-child(1) {
        background-color: var(--col1);
        animation: qc1-rotate 1.2s 0.8s ease forwards;
}
@keyframes qc1-rotate {
        from {
                rotate: 0deg;
        }
        to {
                rotate: -12deg;
        }
}
#qc-peek-wrapper > .quarter-circle:nth-child(2) {
        background-color: var(--col2);
        animation: qc2-rotate 1.05s 0.8s ease forwards;
}
@keyframes qc2-rotate {
        from {
                rotate: 0deg;
        }
        to {
                rotate: -10.5deg;
        }
}
#qc-peek-wrapper > .quarter-circle:nth-child(3) {
        background-color: var(--col3);
        animation: qc3-rotate 0.9s 0.8s ease forwards;
}
@keyframes qc3-rotate {
        from {
                rotate: 0deg;
        }
        to {
                rotate: -9deg;
        }
}
#qc-peek-wrapper > .quarter-circle:nth-child(4) {
        background-color: var(--col4);
        animation: qc4-rotate 0.6s 0.8s ease forwards;
}
@keyframes qc4-rotate {
        from {
                rotate: 0d.........完整代码请登录后点击上方下载按钮下载查看

网友评论0