0
ボタンを押すと、ボタンの周りのバーがアニメーション化されるべきであるということを達成しようとしています。アニメーション丸いボタンの周りのバー
これは私がボタンの周囲のローディングバーを作成する方法CSS3のロジックを考えることはできませんよ、私のボタンのCSS
button {
border: none;
cursor: pointer;
color: white;
width: 60px;
height: 60px;
border-radius: 50%;
font-size: 22px;
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
background: #2196F3;
}
button {
position: relative;
overflow: hidden;
}
button:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 5px;
height: 5px;
background: rgba(255, 255, 255, .5);
opacity: 0;
border-radius: 100%;
transform: scale(1, 1) translate(-50%);
transform-origin: 50% 50%;
}
@keyframes ripple {
0% {
transform: scale(0, 0);
opacity: 1;
}
20% {
transform: scale(25, 25);
opacity: 1;
}
100% {
opacity: 0;
transform: scale(40, 40);
}
}
button:focus:not(:active)::after {
animation: ripple 1s ease-out;
}
<button>
+
</button>
https://jsfiddle.net/k1a3ha4c/2/
です。誰も助けることができますか?
これは私が欲しかったのですが、ボタンの内側ではなく外側に1回だけ繰り返すことができます。国境のように。 – Alen
私の更新された回答を確認してください。 –