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);
            }
        }
        #toast-eyes {
            background-color: none;
            width: 50px;
            height: 50px;
            border-bottom-left-radius: 30px;
            border-top-left-radius: 30px;
            position: relative;
            right: -1.5em;
            top: -8.5em;
            transform: translateY(0);
            transform: rotate(-90deg);
        }

        .eyes {
            margin-top: 20px;
        }

        .mouth {
            position: relative;
            border-radius: 100% 100% 0% 0%/100% 100% 0% 100%;
            height: 8px;
            width: 8px;
            background: black;
            right: 1.8em;
            top: -2.1em;
            transform-origin: center;
            transform: rotate(-90deg);
        }

        .toaster {
            position: relative;
            background: #d0d0d0;
            background: -moz-linear-gradient(180deg, #d0d0d0 0%, #8a8d8e 50%, #808485 57%, #686e6f 72%, #404849 86%, #0c1618 100%);
            background: -webkit-linear-gradient(180deg, #d0d0d0 0%, #8a8d8e 50%, #808485 57%, #686e6f 72%, #404849 86%, #0c1618 100%);
            background: linear-gradient(180deg, #d0d0d0 0%, #8a8d8e 50%, #808485 57%, #686e6f 72%, #404849 86%, #0c1618 100%);
            filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#d0d0d0",endColorstr="#0c1618",GradientType=1);
            width: 275px;
            height: 200px;
            top: 14em;
            left: 4em;
            border-radius: 50% 49% 50% 50%/100% 100% 91% 93%;
            z-index: 2;
        }

        .toaster-bling {
            position: relative;
            background: #dddddd;
            background: -moz-radial-gradient(circle, #dddddd 0%, .........完整代码请登录后点击上方下载按钮下载查看

网友评论0