css实现烤面包动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现烤面包动画效果代码

代码标签: 动画 效果

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

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

<head>

    <meta charset="UTF-8">





    <style>
        body {
            background-color: #5B507A;
        }

        .outer-ring {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 450px;
            height: 450px;
            margin-top: -200px;
            margin-left: -200px;
            border-radius: 50%;
            border: 0.2em solid #adadad;
            box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.5);
            overflow: hidden;
            background: #c2c2c2;
        }

        .circle {
            position: absolute;
            top: 45.8%;
            left: 45.8%;
            width: 400px;
            height: 400px;
            margin-top: -200px;
            margin-left: -200px;
            border-radius: 50%;
            border: 1.2em solid #f5f5f5;
            box-shadow: inset 0 0 12px #191919;
            overflow: hidden;
            background: #B1BDD3;
        }

        .center-items {
            position: absolute;
            top: 55%;
            left: 49.5%;
            transform: translate(-50%, -50%);
        }

        .down {
            position: relative;
            animation: down 1.5s ease-in infinite both;
        }
        .down .up {
            animation: up 1.5s ease-in-out infinite both;
        }
        .down .up .gravity {
            transform-origin: 50% 100%;
            animation: gravity 1.5s cubic-bezier(0.72, 0.03, 0.28, 0.97) infinite both;
        }
        .down .up .gravity .spin-one {
            animation: spin-one 1.5s ease-out infinite both;
        }
        .down .up .gravity .spin-one .spin-two {
            animation: spin-two 1.5s ease-in infinite both;
        }
        .down .up .gravity .spin-one .spin-two .crumb {
            width: 100px;
            height: 100px;
            background: #9d682f;
            border-radius: 53% 46% 25% 20%/56% 51% 91% 93%;
        }
        .down .up .gravity .spin-one .spin-two .crumb .bread {
            width: 95px;
            height: 95px;
            margin-left: 0.12em;
            margin-top: -5px;
            background: #e7c99c;
            border: 0.2em solid #9d682f;
            border-radius: 53% 46% 25% 20%/56% 51% 91% 93%;
        }

@keyframes down {
            0% {
                transform: translateY(-100px);
            }
            20%, 100% {
                transform: translateY(0);
            }
        }
@keyframes up {
            0%, 75% {
                transform: translateY(0);
            }
            100% {
                transform: translateY(-100px);
            }
        }
@keyframes gravity {
            0%, 4% {
                transform: scale(1);
            }
            45% {
                transform: scale(1.2, 0.8);
            }
            100% {
                transform: scale(1);
            }
        }
@keyframes spin-one {
            0% {
                transform: rotate(-135deg);
            }
            20%, 100% {
                transform: rotate(0deg);
            }
        }
@keyframes spin-two {
            0%, 80% {
                transform: rotate(0);
            }
            100% {
                transform: rotate(135deg);
            }
        }
@keyframes shadow {
            0%, 100% {
                transform: scaleX(0.5);
            }
            45%, 50% {
                transform: scaleX(1.8);
           .........完整代码请登录后点击上方下载按钮下载查看

网友评论0