css+div实现红包优惠券发光背景弹出动画效果代码

代码语言:html

所属分类:红包

代码描述:css+div实现红包优惠券发光背景弹出动画效果代码

代码标签: css div 红包 优惠券 发光 背景 弹出 动画

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

    <style>
    body{
        background: #b6b8ba;
    }
    .modal-content{
        position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
 
   
   
       
        z-index:1231;
    }
        .modal-content-bg .modal-content {
            position: relative;
            animation-duration: .3s;
            z-index: 3
        }
        
        .modal-content-bg .modal-mask {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            z-index: 1
        }
        
        @keyframes rotate {
            0% {
                transform: rotate(0deg)
            }
        
            100% {
                transform: rotate(360deg)
            }
        }
        
        @keyframes diffusion {
            0% {
                transform: scale(0.5);
                opacity: 0
            }
        
            40% {
                transform: scale(1.3);
                opacity: 1
            }
        
            60% {
                transform: scale(1.8);
                opacity: 0
            }
        
            61% {
                transform: scale(0.5);
                opacity: 0
            }
        
            80% {
                transform: scale(0.5);
                opacity: 1
            }
        
            100% {
                transform: scale(1.3);
                opacity: 0
            }
        }
        
        @keyframes jianbian {
            0% {
                transform: scale(0.4);
                opacity: 0
            }
        
            100% {
                transform: scale(1);
                opacity: 1
            }
        }
        
                .halo-animated-background {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    position: relative;
                    width: 443px;
                    height: 442px
                }
                
                .halo-animated-background .bg {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    position: absolute;
                    left: 0;
                    top: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 1
                }
                
                .halo-animated-background .bg.bulin {
                    z-index: 2;
                    animation: jianbian .6s linear forwards
                }
                
                .halo-animated-background .bg.bulin::after {
                    content: "";
                    position: relative;
                    width: 100%;
                    height: 100%;
                    background-size: 100% 100%;
                    z-index: 2;
                    animation: rotate 20s infinite linear
                }
                
                .halo-animated-background .bg.halo {
                    z-index: 3
                }
                
                .halo-animated-background .bg.halo::after {
                    content: "";
                    position: relative;
                    width: 314px;
                    height: 314px;
                    background-size: 100% 100%;
                    z-index: 3;
                    animation: diffusion .6s linear forwards
                }
                
                .halo-animated-background .bg.bulin-heavy::after {
                    background-image: url(//repo.bfw.wiki/bfwrepo/icon/66bebaca6f258.png)
                }
                
                .halo-animated-background .bg.halo-heavy::after {
                    background-image: url()
                }
                
                .halo-animated-background .bg.bulin-light::after {
                    opacity: .5;
                    width: 95%;
                    height: 95%;
                    background-image: url()
                }
                
                .halo-animated-background .bg.halo-light::after {
                    opacity: .5;
                    width: 95%;
                    height: 95%;
                    background-image: url()
                }
                
                .halo-animated-background .halo-content {
                    position: relative;
                    z-index: 4
                }
                
                @keyframes cardzoom {
                    0% {
                        transform: scale(1.02)
                    }
                
                    80% {
                        transform: scale(0.88)
                    }
                
                    90% {
                        transform: scale(0.88)
                    }
                
                    100% {
                        transform: scale(1)
                    }
                }
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0