CSS3地形图动态性案例编码(圆圈向扩散)

2021-03-17 16:36 jianzhan

案例实际效果图

案例表明:在地形图上精准定位好几个不一样的点,随后从点中间向扩散光圈。

案例关键点:关键调查CSS3中动漫的应用

关键编码:

<!DOCTYPE html>  
<html lang="en">  
<head>  
    <meta charset="UTF⑻">  
    <title>地形图</title>  
    <style>  
        *{padding:0px;margin: 0px;}  
        .bg{width: 100%;height:770px;position: relative;}  
        .bg img{width: 100%;height: 100%;}  
        .bg .content{width: 748px;height:618px;position: absolute;left: 410px;top: 60px;}  
        .bg .content div{background:#009FD9;width: 10px;height: 10px;border-radius:50%;position: relative;}  
        .bg .content p{position: absolute;width: 10px;height: 10px;border-radius:50%;animation: myfirst 1.5s  infinite;box-shadow: 0px 0px 1px #009FD9; }  
        .bg .content  span{position: absolute;display:block;width: 10px;height: 10px;border-radius:50%;animation: myfirst 1.5s  infinite;box-shadow: 0px 0px 1px #009FD9; animation-delay: 0.5s;}  
        .bg .content .one{position: absolute;left:600px; top:100px;}  
        .bg .content .two{position: absolute;left:550px; top:150px;}  
        .bg .content .three{position: absolute;left:500px; top:200px;}  
        .bg .content .four{position: absolute;left:450px; top:250px;}  
        .bg .content .five{position: absolute;left:400px; top:300px;}  
        .bg .content .six{position: absolute;left:400px; top:350px;}  
        .bg .content .seven{background: #FF9900;position: absolute;left:350px; top:300px;}  
        .bg .content .eight{background: #FF9900;position: absolute;left:400px; top:250px;}  
        .bg .content .nine{background: #A2A9B4;position: absolute;left:250px; top:200px;}  
        .bg .content .ten{background: #A2A9B4;position: absolute;left:300px; top:350px;}  
        @keyframes myfirst{  
            20% {transform: scale(2);}  
            40% {transform: scale(3);}  
            60% {transform: scale(4);}  
            80% {transform: scale(5);}  
            100% {transform: scale(6);}  
        }  
    </style>  
</head>  
<body>  
    <div class="bg"><img src="bg.jpg" alt="">  
        <div class="content"><img src="bg1.png" alt="">  
            <div class="one"><p></p><span></span></div>  
            <div class="two"><p></p><span></span></div>  
            <div class="three"><p></p><span></span></div>  
            <div class="four"><p></p><span></span></div>  
            <div class="five"><p></p><span></span></div>  
            <div class="six"><p></p><span></span></div>  
            <div class="seven"><p></p><span></span></div>  
            <div class="eight"><p></p><span></span></div>  
            <div class="nine"><p></p><span></span></div>  
            <div class="ten"><p></p><span></span></div>  
        </div>  
    </div>  
</body>  
</html>  

留意事项:

1.不一样的点根据精准定位分散化排布在地形图上

2.每一个点运行内存放着两个不一样的掩藏点,掩藏点根据动漫延时作用产生点外扩散的动态性实际效果

3.点扩散的外扩散圈由掩藏点的黑影组成,随后根据动漫1点1点扩张
 

总结

以上所述是网编给大伙儿详细介绍的CSS3地形图动态性案例编码(圆圈向扩散),期待对大伙儿有一定的协助,假如大伙儿有任何疑惑请给我留言,网编会立即回应大伙儿的。在此也十分谢谢大伙儿对脚本制作之家网站的适用!