SVG Button
How do I make an svg button?
Some baby steps into svg - reuse an element with xlink. What is a svg button? How do you make a svg button? This script and codes were developed by Matthias Dittgen on 26 August 2022, Friday.
SVG Button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>SVG Button</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
</head>
<body> <svg width="500" height="500"> <defs> <linearGradient id="gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color:rgba(200, 200, 200, 0.2)" /> <stop offset="100%" style="stop-color:rgba(100, 100, 100, 1.0)" /> </linearGradient> <filter id="dropShadow" x="-10%" y="-25%" width="120%" height="150%"> <feOffset result="offOut" in="SourceAlpha" dx="2" dy="2" /> <feGaussianBlur result="blurOut" in="offOut" stdDeviation="3" /> <feBlend in="SourceGraphic" in2="blurOut" mode="normal" /> </filter> <g id="button"> <rect x="20" y="20" rx="10" ry="10" width="200" height="50" fill="url(#gradient)" stroke="rgba(0, 0, 0, 0.5)" stroke-width="1" opacity="0.5" filter="url(#dropShadow)"> </rect> <text x="120" y="55" font-family="Verdana" font-size="25" fill="rgb(90, 90, 90)" text-anchor="middle">SVG Button</text> </g> </defs> <use xlink:href="#button" x="120" y="0" /> <use xlink:href="#button" x="20" y="20" transform="scale(0.5)" />
</svg> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
SVG Button - Script Codes JS Codes
var bbox = buttonRemove.getBBox();
var width = bbox.width;
var height = bbox.height;
Developer | Matthias Dittgen |
Username | matths |
Uploaded | August 26, 2022 |
Rating | 3 |
Size | 1,927 Kb |
Views | 40,480 |
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 |
D3 bar chart experiment | 2,838 Kb |
Additive color mix with triangles | 2,760 Kb |
Text-shadow fireworks | 2,430 Kb |
Text-shadow outline demo | 2,218 Kb |
Outline demo | 1,871 Kb |
Additive color mixing | 2,865 Kb |
D3 pie chart experiment | 3,821 Kb |
A Pen by Matthias Dittgen | 1,808 Kb |
Smooth font animation | 2,194 Kb |
1x1 trainer | 2,566 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 |
After America | Jonathangarner | 2,686 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Simple Carousel Pure CSS | Dangvanthanh | 4,080 Kb |
A Pen by lizz | Lizz | 10,068 Kb |
Responsive Boxes without Images | Andymcfee | 4,120 Kb |
Cloud upload | Jaflo | 2,774 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
HTM5 picture dropzone | Jaysalvat | 2,576 Kb |
APortfolio | Skybutterfly | 5,174 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 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!