国产麻豆一区二区精彩视频-国产麻豆一区精品视频-国产麻豆一区在线-国产毛a片久久久久无码-国产毛片av一区二区三区网站-国产毛片精品av一区二区

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

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

查看效果:

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

@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无码精品一区二区三区 | 欧美aⅴ片| 亚洲黄色网址在线观看 | 欧美又大又色又爽aaaa片 | 欧美黄色第一页 | 久久精品一区二区免费播放 | 久久精品九九亚洲精品 | 日韩免费黄色片 | 澳门特级 片免费观看视频 澳门一级毛片免费播放 | 久久久久人妻精品一区三寸蜜桃 | 久久婷婷色一区二区三区 | 久99久热| 色综合天天综合高清影视 | 亚洲精品私拍国产福利在线 | 老师脱了内裤让我进去 | 人人爽久久涩噜噜噜蜜桃 | 欧美日韩精彩视频 | 免费国产高清视频 | 日韩人妻无码一区二区三区久久99 | 欧美一级毛片免费大片 | 欧美一级特黄毛片免费 | 日韩一级片在线观看 | 成人资源在线观看 | 色噜噜狠狠一区二区三区果冻 | 久99久热 | 好爽又高潮了毛片免费下载 | 狠狠狠狠狠狠狠狠 | 色综合欧美 | 色婷婷狠狠久久综合五月 | 精品久久精品久久 | 精品欧美一区二区三区精品久久 | 奇米影视第七色 | 国内少妇人妻丰满av | 浮力影院最新地址 | 国产麻传媒精品国产av | 亚洲日韩欧美一区二区三区 | 国产午夜精品一区二区三区四区 | 午夜影院免费版 | 少妇高潮惨叫久久久久久电影 | 亚洲日韩久久综合中文字幕 |