UNPKG

wired-pattern-lock

Version:

A lightweight div-based gesture pattern lock library using SVG lines.

54 lines (49 loc) 894 B
.wired-container { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; } .wired-dot { position: absolute; width: 40px; height: 40px; margin-left: -20px; margin-top: -20px; border: 2px solid #999; border-radius: 50%; background-color: #fff; box-sizing: border-box; transition: all 0.3s; cursor: pointer; } .wired-dot-selected { background-color: #2196F3; border-color: #2196F3; } .wired-dot-selected::after { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; background-color: #fff; border-radius: 50%; pointer-events: none; } .wired-svg { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; z-index: 0; } .wired-line { stroke: #2196F3; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }