在我的頁面上有一個手形圖標,它指向三個圖像。我想要一個動畫圖標,它應該從初始狀態移動到右側,然後從初始狀態移動到左側等等。換句話說,它應該涵蓋所有三個圖像。 我曾嘗試自己也,它是移動的初始狀態,以正確的,但不能從初始狀態到left.Here是我的代碼片段樓下:如何將元素從初始狀態移動到右側,然後從初始狀態移動到左側?
div#skill .logos {
padding: 20px 0;
}
.logos>img {
margin-right: 10px;
}
.move {
position: relative;
animation: move 2s infinite;
animation-direction: alternate-reverse;
}
/*Animation on hand*/
@keyframes move {
0% {
left: 0px;
right: 0px;
}
50% {
left: 60px;
right: 0;
}
100% {
left: 0px;
right: 60px;
}
}
<img class="move center-block" src="img/icons/hand-finger-pointing-down.svg" width="60" height="60">
<div class="logos text-center">
<img src="img/icons/adobe-photoshop.png" width="50" height="50">
<img src="img/icons/bootstrap-4.svg" width="50" height="50">
<img src="img/icons/Sublime_Text_Logo.png" width="50" height="50">
</div>
請指引我,謝謝你提前!
好的謝謝你喲! :) @zsawaf –