Stretchable Text Hover Effect

Stretchable Text Hover Effect code:

1.index.html:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Text Hover Effect</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <h1>VISUAL CODE</h1> </body> </html>

2.style.css:

body { margin: 0; padding: 0; background: rgb(204,102,102); } h1 { color: chartreuse; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: Arial, Helvetica, sans-serif; font-size: 44px; border-top: 5px solid chartreuse; border-bottom: 5px solid chartreuse; padding: 15px 0; transition: 0.3s; } h1:hover { animation: animate 0.5s; letter-spacing: 20px; } @keyframes animate { 0% { letter-spacing: 0px; } 50% { letter-spacing: -20px; } 100% { letter-spacing: 20px; } }

Оставьте комментарий

Ваш адрес email не будет опубликован.