Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Button animation</title>
- <!-- CSS code -->
- <style>
- body {
- padding: 50px;
- background-color: rgb(36, 36, 36);
- }
- .button {
- position: relative;
- padding: 20px 50px;
- text-decoration: none;
- font-size: 25px;
- font-family: Arial, Helvetica, sans-serif;
- border: 3px solid #1fe8b6;
- color: #1fe8b6;
- }
- .button::before, .button::after {
- content: '';
- position: absolute;
- width: 40px;
- height: 40px;
- border: inherit;
- transition: all .5s;
- }
- .button::before {
- top: -15px;
- left: -15px;
- border-width: 3px 0 0 3px;
- }
- .button::after {
- bottom: -15px;
- right: -15px;
- border-width: 0 3px 3px 0;
- }
- .button:hover::before, .button:hover::after {
- width: calc(100% + 27px);
- height: calc(100% + 27px);
- }
- </style>
- </head>
- <body>
- <a href="#" class="button">Learn more</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement