Hovering Snake

Size
2,895 Kb
Views
8,096

How do I make an hovering snake?

What is a hovering snake? How do you make a hovering snake? This script and codes were developed by Chung Man Chau on 15 January 2023, Sunday.

Hovering Snake Previews

Hovering Snake - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hovering Snake</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <a class="button"> <span class="text">Hovering Snake</span> <span class="line line--right"></span> <span class="line line--top"></span> <span class="line line--left"></span> <span class="line line--bottom"></span> </a>
</body>
</html>

Hovering Snake - Script Codes CSS Codes

body { height: 100vh; background: #2d2d2d; font-family: Arial; color: white; display: flex; justify-content: center; align-items: center; margin: 0;
}
.button { display: inline-block; padding: 1rem calc(1rem * 1.2); border: 5px solid transparent; position: relative; font-size: 1.5em; cursor: pointer;
}
.button .text { transform: translate3d(0, 1rem, 0); display: block; transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1) 0.4s;
}
.button:after { position: absolute; content: ''; bottom: -5px; left: calc(1rem * 1.2); right: calc(1rem * 1.2); height: 5px; background: #f26522; z-index: -1; transition: transform 0.8s cubic-bezier(1, 0, 0.37, 1) 0.2s, right 0.2s cubic-bezier(0.04, 0.48, 0, 1) 0.6s, left 0.4s cubic-bezier(0.04, 0.48, 0, 1) 0.6s; transform-origin: left;
}
.line { position: absolute; background: #f26522;
}
.line--right, .line--left { width: 5px; bottom: -5px; top: -5px; transform: scale3d(1, 0, 1);
}
.line--top, .line--bottom { height: 5px; left: -5px; right: -5px; transform: scale3d(0, 1, 1);
}
.line--right { right: -5px; transition: transform 0.1s cubic-bezier(1, 0, 0.65, 1.01) 0.23s; transform-origin: top;
}
.line--top { top: -5px; transition: transform 0.08s linear 0.43s; transform-origin: left;
}
.line--left { left: -5px; transition: transform 0.08s linear 0.51s; transform-origin: bottom;
}
.line--bottom { bottom: -5px; transition: transform 0.3s cubic-bezier(1, 0, 0.65, 1.01); transform-origin: right;
}
a:hover .text,
a:active .text { transform: translate3d(0, 0, 0); transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1) 0.4s;
}
a:hover:after,
a:active:after { transform: scale3d(0, 1, 1); right: -5px; left: -5px; transform-origin: right; transition: transform 0.2s cubic-bezier(1, 0, 0.65, 1.01) 0.17s, right 0.2s cubic-bezier(1, 0, 0.65, 1.01), left 0s 0.3s;
}
a:hover .line,
a:active .line { transform: scale3d(1, 1, 1);
}
a:hover .line--right,
a:active .line--right { transition: transform 0.1s cubic-bezier(1, 0, 0.65, 1.01) 0.2s; transform-origin: bottom;
}
a:hover .line--top,
a:active .line--top { transition: transform 0.08s linear 0.4s; transform-origin: right;
}
a:hover .line--left,
a:active .line--left { transition: transform 0.08s linear 0.48s; transform-origin: top;
}
a:hover .line--bottom,
a:active .line--bottom { transition: transform 0.5s cubic-bezier(0, 0.53, 0.29, 1) 0.56s; transform-origin: left;
}
Hovering Snake - Script Codes
Hovering Snake - Script Codes
Home Page Home
Developer Chung Man Chau
Username chungman93
Uploaded January 15, 2023
Rating 3
Size 2,895 Kb
Views 8,096
Do you need developer help for Hovering Snake?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Chung Man Chau (chungman93) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!