按钮放大缩小跳动效果 纯css
【代码】按钮放大缩小跳动效果 纯css。
·
<div class="taskBtnBox taskBtnBoxAnimation">
<button class="taskBtn">开始任务</button>
</div>
.taskBtnBox{
width:50%;
height:100px;
margin:120px auto 0;
background: #0050b3;
color:#fff;
font-size: 35px;
position: relative;
border-radius: 60px;
font-weight: bold;
.taskBtn{
width: 100%;
height:100%;
background: none;
border: 0;
color: #fff;
font-weight: bold;
cursor: not-allowed;
}
}
.taskBtnBoxAnimation{
animation: scaleAnimation 1s ease 0s infinite alternate;
// animation-play-state: paused;
animation-play-state: running;
&:hover{
animation-play-state: paused;
}
.taskBtn{
cursor: pointer;
}
}
@keyframes scaleAnimation {
from { transform: scale(1); }
20% { transform: scale(1.1); }
80% { transform: scale(1.1); }
100%,to { transform: scale(1); }
}
更多推荐
已为社区贡献4条内容
所有评论(0)