Experiment - SCSS SVG Background Image with Variables
How do I make an experiment - scss svg background image with variables?
Working through some solutions to make these work, especially the hover transition in example #1. Any input/suggestions welcome.. What is a experiment - scss svg background image with variables? How do you make a experiment - scss svg background image with variables? This script and codes were developed by Chris Holder on 20 June 2022, Monday.
Experiment - SCSS SVG Background Image with Variables - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Experiment - SCSS SVG Background Image with Variables</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ [class*="ex-"] { width: 100%; height: 400px; border: 1px solid #ccc; margin: 10px 0;
}
/*
// SVG
// Kinda Works! But needs to be much much smoother.
*/
.ex-1, p { transition: all 1s ease-in-out;
}
.ex-1 { background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px"><rect fill="#3498db" width="7.5" height="7.5"/><rect fill="white" x="7.5" width="7.5" height="7.5"/><rect fill="white" y="7.5" width="7.5" height="7.5"/><rect fill="#b6daf2" x="7.5" y="7.5" width="7.5" height="7.5"/></svg>');
}
.ex-1 p { background: #e74c3c; width: 50%; margin: 150px auto; padding: 20px 0; text-align: center; color: white; font-family: sans-serif; font-size: 13px; font-weight: bold; box-shadow: 4px 4px 0 0 #c0392b;
}
.ex-1:hover { background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="152px" height="152px"><rect fill="#2ecc71" width="76" height="76"/><rect fill="white" x="76" width="76" height="76"/><rect fill="white" y="76" width="76" height="76"/><rect fill="#a8ebc4" x="76" y="76" width="76" height="76"/></svg>');
}
.ex-1:hover p { background: #9b59b6; box-shadow: 4px 4px 0 0 #8e44ad;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="examples"> <div class="ex-1"><p>HOVER ME</p></div>
</div>
</body>
</html>
Experiment - SCSS SVG Background Image with Variables - Script Codes CSS Codes
[class*="ex-"] { width: 100%; height: 400px; border: 1px solid #ccc; margin: 10px 0;
}
/*
// SVG
// Kinda Works! But needs to be much much smoother.
*/
.ex-1, p { transition: all 1s ease-in-out;
}
.ex-1 { background: url('data:image/svg+xml;utf8,');
}
.ex-1 p { background: #e74c3c; width: 50%; margin: 150px auto; padding: 20px 0; text-align: center; color: white; font-family: sans-serif; font-size: 13px; font-weight: bold; box-shadow: 4px 4px 0 0 #c0392b;
}
.ex-1:hover { background: url('data:image/svg+xml;utf8,');
}
.ex-1:hover p { background: #9b59b6; box-shadow: 4px 4px 0 0 #8e44ad;
}

Developer | Chris Holder |
Username | see8ch |
Uploaded | June 20, 2022 |
Rating | 3 |
Size | 3,270 Kb |
Views | 58,667 |
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 |
One from many. | 2,423 Kb |
GSchool Workshop Demo - Winter 2015 | 3,433 Kb |
Readable typography mixin - auto line height | 2,827 Kb |
Contact Form Template | 5,229 Kb |
DevCamp 2014 - Denver Public Library | 5,033 Kb |
Code Motel Logo | 3,759 Kb |
GSchool Workshop Demo - Winter 2015 | 2,017 Kb |
My Logo | 2,811 Kb |
A Pen by Chris Holder | 2,538 Kb |
Northerli Logo | 5,477 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 |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
Find The Penguin | Lelder | 2,212 Kb |
Toggling Divs with jQuery | Yying6 | 1,967 Kb |
Easing | GreenSock | 2,043 Kb |
Nice textured background | Hans | 2,659 Kb |
Clock Face Idea | Chrisburnell | 3,196 Kb |
Another brick in the wall | Fivera | 1,955 Kb |
JS Countdown Timer | Ayoungh | 2,435 Kb |
Faces SVG animation | ScavengerFrontend | 2,957 Kb |
3D flipping card | Ssaakkaa | 2,238 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!