国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

html5 - 用css動畫方式描述:一個球彈起落下(持續時間2s,,執行一次)

瀏覽:147日期:2022-12-11 10:09:45

問題描述

用css動畫方式描述:一個球彈起落下(持續時間2s,,執行一次)

問題解答

回答1:

隨意寫的 沒有考慮兼容 可以自己更改一下運動速度什么的

<style>#app{ width: 300px; height:400px; border: 1px solid #d6e9c6; position: relative;}.barTip{ width: 100px; height: 10px; background: red; position: absolute; top: 130px; left: 32%;}#bar{ position: absolute; width: 30px; height:30px; background: #2a6496; border-radius: 15px; left: 45%; animation-name:myfirst; animation-duration:2s; animation-timing-function:linear; /*animation-delay:2s;*/ animation-iteration-count:1; animation-direction:alternate; animation-play-state:running;}@keyframes myfirst{ 0% { top:0px;} 10% { top:20px;} 20% { top:40px;} 30% { top:60px;} 40% { top:80px;} 50% { top:100px;} 60% { top:80px;} 70% { top:60px;} 80% { top:40px;} 90% { top:20px;} 100% { top:0px;}} </style></head><body><p id='app'> <p id='bar'><!--球--> </p> <!--板--> <p class='barTip'> </p></p回答2:

不知道你是不是要這樣,建議你還是看一下css3jsbin demo

標簽: Html5
相關文章:
主站蜘蛛池模板: 南漳县| 宁夏| 道真| 镇巴县| 兴宁市| 当阳市| 达日县| 和林格尔县| 车险| 屏南县| 铜梁县| 夹江县| 岐山县| 乌苏市| 左贡县| 马龙县| 政和县| 新建县| 淮阳县| 铁岭县| 佛山市| 福安市| 巴南区| 延津县| 疏勒县| 盖州市| 祁门县| 韩城市| 綦江县| 临海市| 北碚区| 闻喜县| 故城县| 商水县| 延长县| 二连浩特市| 大竹县| 平潭县| 陇西县| 寿宁县| 景东|