向右擦除
用 clip-path 從右往左擦除,可做退場。
效果預覽
參數調節
完整代碼
/* 向右擦除 */
@keyframes wipeRight {
from { clip-path: inset(0 0 0 0); }
to { clip-path: inset(0 0 0 100%); }
}
.wipe-right { animation: wipeRight .6s cubic-bezier(.65,0,.35,1) both; }