我有一個div
這是shape.I圈做了animation
事情CSS。現在我想做的事情時,圈去底再繞size
保持不變(現在這是確定對我來說),但是當圓反彈頂部則圓減少它的size
。我不知道,是有可能與CSS?我在JS非常周。任何人都可以解決我的問題或建議我正確的方式嗎?如何減少圈子大小?
在此先感謝。
HTML:
<div class="hello"></div>
CSS:
.hello{
width:100px;
height:100px;
border:5px solid black;
border-radius:55px;
}
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
-webkit-animation-name: example;
-webkit-animation-duration: 4s;
animation-name: example;
animation-duration: 4s;
}
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
我不確定。這是你在尋找什麼https://jsfiddle.net/7qp8cjxe/2/ – abhishekkannojia
這是我想做的。謝謝:) –
移動此爲答案。 – abhishekkannojia