国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

css呼吸燈

這篇具有很好參考價值的文章主要介紹了css呼吸燈。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

css呼吸燈

CSS中animation動畫

Animations由兩部分組成:文章來源地址http://www.zghlxwxcb.cn/news/detail-449918.html

  • css動畫的配置;
    • animation-name :xx (設(shè)置關(guān)鍵幀的名稱為xx);
    • animation-duration:1s (動畫持續(xù)時間為1s);
    • animation-timing-function: linear (動畫時間曲線:linear、ease(默認(rèn))、ease-in 、ease-out、ease-in-out、cubic-bezier(n,n,n,n) ) 。
    • animation-delay:2s (動畫等待2后開始);
    • animatiom-iteration-count:infinite (動畫播放次數(shù));
    • animation-direction:alternate(設(shè)置動畫播放形式,規(guī)定動畫是否在下一周期逆向地播放 nomal、reverse );
    • animation-fill-mode: (動畫結(jié)束的最后一幀,規(guī)定對象動畫時間之外的狀態(tài));
    • animation-play-state: (設(shè)置動畫是否暫停);
  • keyframes關(guān)鍵幀:一系列的keyframes(用來描述動畫的開始、過程、結(jié)束狀態(tài));
    • from to:
    • 百分比:
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>呼吸燈</title>
        <style>
            .btn-group{
                width: 100px;
                height: 100px;
            }
            .box{
                width: 100px;
                height: 100px;
                border: 1px solid #333;
            }
            .breath{
                display: inline-block;
                width: 30px;
                height: 30px;
                border: 1px solid #333;
                border-radius: 50%;
                position: relative;

            }
            .breath .transcribe{
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                display: inline-block;
                width: 10px;
                height: 10px;
                border: 1px solid #333;
                border-radius: 50%;
                background-color: red;
                animation: myMove 1s linear infinite;
                animation-play-state:running;
            }
            .breath .transcribe:hover{
                background-color:green;
                /* animation-play-state:paused; */
            }
            @keyframes myMove {
		  0% {
		    opacity: 1;	  
            /* visibility:visible; */
      }
      25% {
		    opacity: 0;	  
            /* visibility:visible; */
      }
      
	
		  100% {
        opacity: 0;
        /* visibility: hidden; */
		  }
		}
        </style>
	</head>
	<body>
        <div class="btn-group">
            <button onclick="pause()">暫停</button>
            <button onclick="start()">開始</button>
        </div>
		<div class="box">
            <span class="breath">
                <span class="transcribe"></span>
            </span>
        </div>
	</body>
</html>
<script type="text/javascript">
function pause () {
    let ele = document.querySelector('.transcribe')
    console.log("pause", ele);
    ele.style.animationPlayState = "paused"
}

function start () {
    let ele = document.querySelector('.transcribe')
    console.log("start", ele);
    ele.style.animationPlayState = "running"
}

function shouldResize() {
    console.log("current", window.innerWidth, window.innerHeight);
}

function shouldLoad(){
    console.log("onload");
}

window.addEventListener("resize", shouldResize)
window.addEventListener("load", shouldLoad)
</script>

到了這里,關(guān)于css呼吸燈的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 【Flutter】【packages】simple_animations 簡單的實現(xiàn)動畫

    【Flutter】【packages】simple_animations 簡單的實現(xiàn)動畫

    導(dǎo)入包到項目中去 可以實現(xiàn)簡單的動畫, 快速實現(xiàn),不需要自己過多的設(shè)置 有多種樣式可以實現(xiàn) [ ] 簡單的用例:具體需要詳細(xì)可以去 pub 鏈接地址 1. PlayAnimationBuilder 新增child 參數(shù),靜態(tài)的child ,減少資源的浪費,其他的build 同樣可以這樣使用 2.LoopAnimationBuilder 循環(huán)動畫 該用

    2024年02月13日
    瀏覽(21)
  • css的animation動畫

    創(chuàng)建動畫序列,需要使用 animation 屬性或其子屬性,該屬性允許配置動畫時間、時長以及其他動畫細(xì)節(jié),但該屬性不能配置動畫的實際表現(xiàn),動畫的實際表現(xiàn)是由 @keyframes 規(guī)則實現(xiàn) 屬性 描述 animation-name 指定由 @keyframes 描述的關(guān)鍵幀名稱 animation-duration 設(shè)置動畫一個周期的時長

    2024年02月06日
    瀏覽(42)
  • animate.css 動畫

    Animate.css | A cross-browser library of CSS animations. class=\\\"animate__bounce\\\" 1.? ? bounce ? ? ? ? ? ? 彈跳 2.?? ?flash ? ? ? ? ? ? ?閃爍 3.?? ?pulse ? ? ? ? ? ? ?放大,縮小 4.?? ?rubberBand ? ? ? ? 放大,縮小,彈簧 5.?? ?shake ? ? ? ? ? ? ?左右晃動 6.?? ?headShake ? ? ? ? ?左右小幅

    2024年02月11日
    瀏覽(28)
  • css動畫(animation)常用屬性

    ? ??? ??? ??? ??? ??? ???? 1.animation-name:動畫名稱 ?? ??? ??? ??? ??? ??? ??? ??? ??? ? ?2.@keyframes:動畫定義,后面跟動畫名稱 ?? ??? ??? ??? ??? ??? ??? ??? ??? ? 3.animation-duration:動畫持續(xù)時長,單位(s) ?? ??? ??? ??? ??? ??? ?

    2023年04月27日
    瀏覽(26)
  • CSS中animation動畫-詳解

    CSS中animation動畫-詳解

    1、animation有什么組成? Animations由兩部分組成:css動畫的配置,以及一系列的keyframes(用來描述動畫的開始、過程、結(jié)束狀態(tài))。不需要了解任何Js技術(shù)即可完成動畫的制作 2、關(guān)鍵幀應(yīng)該怎么表示? 0%表示動畫的初始時間,也可以通過from表示。100%表示動畫的結(jié)束時間

    2024年02月01日
    瀏覽(18)
  • CSS animation動畫使用詳解

    CSS animation動畫使用詳解

    目錄 一、animation動畫的使用步驟 第一步:定義動畫 第二步:使用動畫 二、animation的復(fù)合屬性 三、animation的拆分屬性 四、動畫屬性 animation:動畫名稱 動畫時長 速度曲線 延遲時間 重復(fù)次數(shù) 動畫方向 執(zhí)行完畢時的狀態(tài) 逐幀動畫(配合精靈圖使用) animation-timing-function:step(N) N為將動

    2024年02月16日
    瀏覽(28)
  • SVG+CSS動畫實現(xiàn)動效(流光、呼吸等效果)

    SVG+CSS動畫實現(xiàn)動效(流光、呼吸等效果)

    繪制流光線條 創(chuàng)建SVG,根據(jù)UI給的背景圖,定位到圖上每條管道(即流光線條的路徑)的起始點以及拐點,繪制折線。繪制折線的時候按照下圖方框通過class分組,這幾組的光線流動是同時出發(fā)的。 svg相關(guān)知識點:https://www.w3school.com.cn/svg/index.asp 折線樣式 讓光線動起來 上邊

    2024年01月21日
    瀏覽(35)
  • 神仙般的css動畫參考網(wǎng)址,使用animate.css

    Animate.css | A cross-browser library of CSS animations. Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and attention-guiding hints. https://animate.style/ 這里面有很多簡單的css樣式,可以引這個包,但是也可以根據(jù)他的源碼改動一下,很簡

    2024年02月11日
    瀏覽(11)
  • CSS筆記——觸發(fā)式動畫Transition、主動式動畫Animation、Transfrom 動畫、CSS 3D 動畫、陰影和濾鏡樣式

    一、觸發(fā)式動畫Transition transition過渡動畫, 一般配合偽類使用 屬性值: transition-duration: 指定過渡效果的持續(xù)時間,以秒或毫秒為單位。 transition-timing-function: 指定過渡效果的時間函數(shù),即控制過渡速度的函數(shù)。常用的值有 ease、linear、ease-in、ease-out、ease-in-out 等。 transi

    2024年02月07日
    瀏覽(22)
  • HTML之CSS Animation 屬性常用動畫

    引入下面的樣式表后 -webkit-animation: tada 1s ease 0.3s infinite both; -webkit-animation: name duration timing-function delay iteration_count direction animation 各個參數(shù)詳細(xì)用法請看 https://www.w3school.com.cn/css/css3_animations.asp cubic-bezier 生成器 https://cubic-bezier.com

    2024年01月19日
    瀏覽(20)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包