亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

通過css3動畫和opacity透明度實現(xiàn)呼吸燈效果

  發(fā)布時間:2019-08-09 15:29:54   作者:殷浩   我要評論
這篇文章主要介紹了通過css3動畫和opacity透明度實現(xiàn)呼吸燈效果,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

本文介紹了通過css3動畫和opacity透明度實現(xiàn)呼吸燈效果的方法,分享給大家,具體如下:

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

<meta charset="UTF-8">
<title>呼吸燈</title>
/*也可以通過加層罩,通過設(shè)置層罩透明度來實現(xiàn)亮度動畫*/
<style>
    body{
        background-color: black;
    }
    div{
        margin: 0 auto;
        margin-top: 200px;
        width: 300px;
        height: 300px;
        border-radius: 50%;
        background-color: yellow;
        box-shadow: 0 0 80px red;
        animation-name: light;
        animation-duration: 3s;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
        animation-direction: alternate;
    }
    @keyframes light{
        from{
            opacity: 1;
        }
        to{
            opacity: 0.2;
        }
    }
</style>
</head>
<body>

<div></div>
</body>
</html>

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • 純css和flutter分別實現(xiàn)呼吸燈效果(實例代碼)

    這篇文章主要介紹了純css和flutter分別實現(xiàn)呼吸燈效果,本文通過實例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2021-02-23

最新評論