Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock icon animation #281

Open
sisou opened this issue Apr 30, 2019 · 0 comments
Open

Lock icon animation #281

sisou opened this issue Apr 30, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@sisou
Copy link
Member

sisou commented Apr 30, 2019

<html>
<head>
  <style>
    body {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .lock {
      opacity: .2;
      width: 64px;
      height: 96px;
      overflow: visible;
    }

    .bracket {
      transition: transform .25s .4s ease-in-out;
    }

    .lock:hover .bracket {
      transform: translate3D(0,-20px,0);
    }

    .lock:hover {
      animation: pulse 1.3s cubic-bezier(.7,0,.3,1) forwards;
    }

    @keyframes pulse {
      0% { transform: scale(1); }
      45% { transform: scale(1.1); }
      70% { transform: scale(1.1); opacity: .2}
      100% { transform: scale(1); opacity: 0 }
    }
  </style>
</head>
<body>
  <svg class="lock" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 96">
    <style>
      .base{
        fill: #1f2348;
      }
      .bracket{
        fill: none;
        stroke: #1f2348;
        stroke-linecap: round;
        stroke-width: 10px;
      }
    </style>
    <path class="base" d="M32,32A32,32,0,1,0,64,64,32,32,0,0,0,32,32Zm0,40a8,8,0,1,1,8-8A8,8,0,0,1,32,72Z"/>
    <path class="bracket" d="M53,65V26a21,21,0,0,0-42,0V46"/>
  </svg>
</body>
@sisou sisou added the enhancement New feature or request label Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant