Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2013 17:35
What would you like to do?
Change an SVG file through the URL hash
* Change an SVG file through the URL hash
* Warning: Does NOT work on WebKit.
body {
background: silver;
.logo {
width: 100px; height: 100px;
background: url('') no-repeat;
.logo:hover {
background-image: url('');
.logo:active {
background-image: url('');
<h1>Inside an &lt;img>:</h1>
<img src="" />
<img src="" />
<img src="" />
<h1>As a background on a &lt;div>:</h1>
<div class="logo"></div>
<h1>Through &lt;object> tags:</h1>
<object data=""></object>
<object data=""></object>
<object data=""></object>
Copy link

chee commented Mar 19, 2013

do you know y does this not work on webkit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment