CSS 按鈕水波紋特效


/* 按鈕反饋之波紋 */
.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;
}
/* 按鈕反饋之波紋 */


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM