CSS 按钮水波纹特效

夙愿已清 提交于 2019-12-04 18:28:49

/* 按钮反馈之波纹 */
.ripple {
position: relative;
/* overflow:hidden */  打开注释及效果不扩散在外
}
.ripple:focus{
outline: none;
}

.ripple:after {
content: "";
display: block;
position: absolute;
top: -10px;
left: -10px;
right: -10px;
bottom: -10px;
pointer-events: none;
background-color: #888;
background-repeat: no-repeat;
background-position: 50%;
opacity: 0;
transition: all .3s;
}

.ripple:active:after {
opacity: .3;
top: 0;
left: 0;
right: 0;
bottom: 0;
transition: 0s;
}
/* 按钮反馈之波纹 */

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!