九九热线视频精品99-动漫高h纯肉无码视频在线观看-午夜理论无码片在线观看免费-99精品国产在热久久无码-亚洲国产成人乱码

純css3圓形從中心向四周擴散動畫效果

2016/12/14 8:38:39   閱讀:2308    發布者:2308

查看效果:

先來個簡單的示例,例如:

@keyframes hovertreemove
{
from {top:30px;}
to {top:130px;}
}

效果:

可以通過 @keyframes 規則,創建動畫。

創建動畫的原理是,將一套 CSS 樣式逐漸變化為另一套樣式。
在動畫過程中,您能夠多次改變這套 CSS 樣式。
以百分比來規定改變發生的時間,或者通過關鍵詞 "from" 和 "to",等價于 0% 和 100%。
0% 是動畫的開始時間,100% 動畫的結束時間。
為了獲得最佳的瀏覽器支持,您應該始終定義 0% 和 100% 選擇器。

以下為上下運動的代碼:

<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    <meta name="viewport" content="width=device-width, initial-scale=1" /> 
    <title>css3使用animation和@keyframes制作動畫_何問起</title> 
    <meta charset="utf-8" /> 
    <style> 
@keyframes hovertreemove 
{ 
from {top:30px;} 
to {top:130px;} 
} 
#hovertreekf{ 
    width:80px;height:80px; 
    border:1px solid red; 
    position:absolute; 
    background:url(images/smile.png) no-repeat center; 
    animation:hovertreemove /*動畫樣式名稱*/ 
        1s /*動畫時間*/ 
    linear /*線性運動*/ 
        infinite /*無線播放*/ 
        alternate/*往返動畫*/; 
} 
  a{color:blue;text-decoration:none;}  </style> 
</head> 
<body><a href="bjaf/i309b77d.htm" target="_blank">說明</a> 
    <div id="hovertreekf"></div> 
</body> 
</html>

以下為圓形擴散運動的代碼:

<!DOCTYPE html> 
<html> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <meta name="viewport" content="width=device-width, initial-scale=1" /> 
    <title>純css3圓形從中心向四周擴散動畫效果_何問起</title> 
    <style> 
        @keyframes warn { 
            0% { 
                transform: scale(0.3); 
                -webkit-transform: scale(0.3); 
                opacity: 0.0; 
            } 

            25% { 
                transform: scale(0.3); 
                -webkit-transform: scale(0.3); 
                opacity: 0.1; 
            } 

            50% { 
                transform: scale(0.5); 
                -webkit-transform: scale(0.5); 
                opacity: 0.3; 
            } 

            75% { 
                transform: scale(0.8); 
                -webkit-transform: scale(0.8); 
                opacity: 0.5; 
            } 

            100% { 
                transform: scale(1); 
                -webkit-transform: scale(1); 
                opacity: 0.0; 
            } 
        } 

        @keyframes warn1 { 
            0% { 
                transform: scale(0.3); 
                -webkit-transform: scale(0.3); 
                opacity: 0.0; 
            } 

            25% { 
                transform: scale(0.3); 
                -webkit-transform: scale(0.3); 
                opacity: 0.1; 
            } 

            50% { 
                transform: scale(0.3); 
                -webkit-transform: scale(0.3); 
                opacity: 0.3; 
            } 

            75% { 
                transform: scale(0.5); 
                -webkit-transform: scale(0.5); 
                opacity: 0.5; 
            } 

            100% { 
                transform: scale(0.8); 
                -webkit-transform: scale(0.8); 
                opacity: 0.0; 
            } 
        } 

        .container { 
            position: relative; 
            width: 40px; 
            height: 40px; 
            /*border: 1px solid #000; hovertree.com */ 
        } 
        /* 保持大小不變的小圓圈 何問起 */ 
        .dot { 
            position: absolute; 
            width: 92px; 
            height: 92px; 
            left: 120px; 
            top: 120px; 
            -webkit-border-radius: 50%; 
            -moz-border-radius: 50%; 
            border: 2px solid red; 
            border-radius: 50%; 
            z-index: 2; 
        } 
        /* 產生動畫(向外擴散變大)的圓圈  */ 
        .pulse { 
            position: absolute; 
            width: 320px; 
            height: 320px; 
            left: 2px; 
            top: 2px; 
            border: 6px solid red; 
            -webkit-border-radius: 50%; 
            -moz-border-radius: 50%; 
            border-radius: 50%; 
            z-index: 1; 
            opacity: 0; 
            -webkit-animation: warn 2s ease-out; 
            -moz-animation: warn 2s ease-out; 
            animation: warn 2s ease-out; 
            -webkit-animation-iteration-count: infinite; 
            -moz-animation-iteration-count: infinite; 
            animation-iteration-count: infinite; 
            box-shadow: 1px 1px 30px red; 
        } 

        .pulse1 { 
            position: absolute; 
            width: 320px; 
            height: 320px; 
            left: 2px; 
            top: 2px; 
            border: 6px solid red; 
            -webkit-border-radius: 50%; 
            -moz-border-radius: 50%; 
            border-radius: 50%; 
            z-index: 1; 
            opacity: 0; 
            -webkit-animation: warn1 2s ease-out; 
            -moz-animation: warn1 2s ease-out; 
            animation: warn1 2s ease-out; 
            -webkit-animation-iteration-count: infinite; 
            -moz-animation-iteration-count: infinite; 
            animation-iteration-count: infinite; 
            box-shadow: 1px 1px 30px red; 
        }a{color:blue;text-decoration:none;} 
    </style> 
</head> 

<body><a href="bjaf/i309b77d.htm" target="_blank">說明</a> 
    <div class="container"> 
        <div class="dot"></div> 
        <div class="pulse"></div> 
        <div class="pulse1"></div> 
    </div> 
</body> 
</html>

關于:hover div

flex 彈性布局

主站蜘蛛池模板: 麻豆一精品传媒卡一卡二传媒短视频| 丰满少妇大力进入av亚洲| 露脸内射熟女--69xx| 久久久无码一区二区三区| 欧美性猛交aaaa片黑人| 亚洲精品久久66国产高清| 国产成人综合久久免费| 真实国产老熟女粗口对白| 午夜福利试看120秒体验区| 男女18禁啪啪无遮挡激烈网站| 最新国产精品剧情在线ss| 国产一卡2卡3卡四卡国色天香 | 狠狠的干性视频| 亚洲 欧美 另类图片| 国精产品一区一区三区免费视频| 在线最新av免费费观看| 亚洲综合另类小说色区大陆| 一本一道波多野结衣一区| 久久/这里只精品热在线获取| 四虎国产精品永久在线无码| 久久久久久久久888| 澳门永久av免费网站| 国产自偷在线拍精品热| 国产边打电话边被躁视频| 午夜精品久久久久久久99老熟妇| 国产无遮挡裸体美女视频| 欧洲美熟女乱又伦av影片| 亚洲大尺度专区无码浪潮av| 国产清纯在线一区二区www| 亚洲精品国产综合久久一线| 综合亚洲伊人午夜网| 国产一区二区野外| 欧美性色老妇人| 西西人体大胆瓣开下部毛茸茸| 伊人久久大香线蕉综合影视| 国内丰满熟女出轨videos| 亚洲制服有码在线丝袜| 在线无码免费的毛片视频| 国产尤物在线视精品在亚洲| 中文字幕有码无码人妻在线| 国产口爆吞精在线视频2020版|