久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術(shù)文章
文章詳情頁

html5 - 用css動(dòng)畫方式描述:一個(gè)球彈起落下(持續(xù)時(shí)間2s,,執(zhí)行一次)

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

問題描述

用css動(dòng)畫方式描述:一個(gè)球彈起落下(持續(xù)時(shí)間2s,,執(zhí)行一次)

問題解答

回答1:

隨意寫的 沒有考慮兼容 可以自己更改一下運(yùn)動(dòng)速度什么的

<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

標(biāo)簽: Html5
相關(guān)文章:
主站蜘蛛池模板: 定州市| 邹城市| 班戈县| 商洛市| 农安县| 揭东县| 湖口县| 海安县| 通化县| 苗栗县| 昆明市| 商水县| 稷山县| 纳雍县| 九龙坡区| 雷州市| 怀宁县| 西安市| 虞城县| 阜康市| 额尔古纳市| 广东省| 永德县| 新闻| 万盛区| 潮州市| 禹州市| 岗巴县| 浙江省| 桦川县| 天镇县| 辽阳市| 五台县| 甘泉县| 晴隆县| 灵璧县| 渭南市| 光山县| 宽甸| 荔波县| 鄱阳县|