SVG Stroke Drawing Effect on Focus
How do I make an svg stroke drawing effect on focus?
What is a svg stroke drawing effect on focus? How do you make a svg stroke drawing effect on focus? This script and codes were developed by Andy Merskin on 10 August 2022, Wednesday.
SVG Stroke Drawing Effect on Focus - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>SVG Stroke Drawing Effect on Focus</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrapper" tabindex="0"> <svg width="640" height="320"> <filter id="blur"> <feGaussianBlur in="SourceGraphic" stdDeviation="2" /> </filter> <rect class="shape shape-fill"></rect> <rect class="shape" filter="url(#blur)"></rect> <div class="text">Click Me</div> </svg>
</div>
</body>
</html>
SVG Stroke Drawing Effect on Focus - Script Codes CSS Codes
html, body { background-color: #222; text-align: center; height: 100%;
}
.wrapper { position: relative; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); margin: 0 auto; width: 640px; outline: none;
}
.wrapper svg { display: block;
}
.shape { width: 636px; height: 316px; -webkit-transform: translate(2.5px, 2.5px); transform: translate(2.5px, 2.5px); fill: transparent; stroke: #ccc; stroke-width: 1px; stroke-dasharray: 1920; stroke-dashoffset: 1920; -webkit-transition: stroke-dashoffset 0s, fill 0.15s; transition: stroke-dashoffset 0s, fill 0.15s;
}
.wrapper:focus { background-color: #242424;
}
.wrapper:focus .shape { stroke-dashoffset: 0; -webkit-transition: stroke-dashoffset 1s, fill 0.3s 1s; transition: stroke-dashoffset 1s, fill 0.3s 1s;
}
.wrapper:focus .shape-fill { fill: #ddd;
}
.wrapper:focus .text { color: #333; -webkit-transition: color 0.3s 1s; transition: color 0.3s 1s;
}
.text { width: 100%; position: absolute; top: 0; line-height: 320px; color: #fff; -webkit-transition: color 0.3s; transition: color 0.3s;
}
Developer | Andy Merskin |
Username | andymerskin |
Uploaded | August 10, 2022 |
Rating | 3 |
Size | 2,399 Kb |
Views | 34,408 |
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!
Name | Size |
Vue.js Recipe - Slideout Menu | 5,189 Kb |
Vue.js Intro Demo | 2,077 Kb |
Vue List Transitions - Bug Test | 2,741 Kb |
Vue.js Starter | 1,268 Kb |
Text Antialiasing Differences | 2,725 Kb |
SASS Easings | 2,426 Kb |
Table Row Peek | 3,107 Kb |
Wires Loading Animation | 3,813 Kb |
GSS Transitions | 2,097 Kb |
Animated Dropdowns with scaleY | 2,507 Kb |
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!
Name | Username | Size |
CSS Colors | Alexpate | 2,232 Kb |
Caputre Cam with JS | KimmoCommit | 2,795 Kb |
See Through | Larrygeams | 77,410 Kb |
Horizontal Navigation with Floats | Gymratpacks | 5,403 Kb |
CSS3 Button Examples | Volusion | 3,377 Kb |
Vue Transition | Chenming142 | 4,561 Kb |
Two joint circles - One element | Berdejitendra | 1,704 Kb |
Mosaic transition effect between two photos using jQuery | Stathisg | 2,518 Kb |
Weather Icons | Gtalin | 2,519 Kb |
Animated Logo | Shakdaniel | 2,672 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!