欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

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

本文介紹了通過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)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論