Css 閃爍效果_Css3 閃爍動畫效果


Css 閃爍效果_Css3 閃爍動畫效果

 

1. 方案1,:befor:after +animation

css

  .block {
            width: 400px;
            height: 300px;
            padding: 50px;
            border: 1px solid red;
            /* background: #000735; */
        }

        @keyframes twinkling {
            0% {
                opacity: 0.2;
                filter: alpha(opacity=20);
                transform: scale(1);
            }

            50% {
                opacity: 0.5;
                filter: alpha(opacity=50);
                transform: scale(1.12);
            }

            100% {
                opacity: 0.2;
                filter: alpha(opacity=20);
                transform: scale(1);
            }
        }


        .circle {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: #3a96e1;
            text-align: center;
            font-weight: bold;
            position: relative;
            line-height: 100px;
            z-index: 1;
        }

        .circle::before {
            background: inherit;
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            z-index: -2;
            border-radius: 50%;
            animation: twinkling 2.2s ease-in-out infinite;
        }

        .circle::after {
            background: inherit;
            content: '';
            position: absolute;
            width: 110%;
            height: 110%;
            left: -5%;
            top: -5%;
            z-index: -1;
            border-radius: 50%;
            animation: twinkling 2.2s ease-in-out infinite;
        }

        .circle2 {
            margin-top: 50px;
            width: 80px;
            height: 80px;
            line-height: 80px;
            font-size: 12px;
            background: #d67c61;
        }
View Code

 

html

    <div class="block">
        <div class="circle">千樂微雲</div>
        <div class="circle circle2">小程序開發</div>
    </div>

 

展示效果:

 

2.方案2

待完善

 

更多:

Css 左右循環動畫_左右循環運動效果案例

 CSS3 進度條布局整理

Css3 實現全圓進度條展示功能


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM