SCSS 点击波纹效果
作者:
此昵称已被狗抢占 | 来源:发表于
2018-01-09 22:07 被阅读0次 .click {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, .6);
z-index: 0;
animation: ripple 500ms linear 1;
animation-delay: 50;
}
@mixin area {
$width: 30px;
$height: 30px;
width: $width;
height: $height;
margin-left: - $width/2;
margin-top: - $height/2;
}
@keyframes ripple {
/*scale the element to 250% to safely cover
the entire link and fade it out*/
0% {
@include area;
transform: scale(0);
}
65% {
@include area;
opacity: 0;
transform: scale(2.5);
}
100% {
@include area;
opacity: 0;
transform: scale(2.5);
}
}
本文标题:SCSS 点击波纹效果
本文链接:https://www.haomeiwen.com/subject/yotnnxtx.html
网友评论