Last active
November 23, 2015 10:43
-
-
Save vnys/dd651d1df179974044f4 to your computer and use it in GitHub Desktop.
svg circle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button { | |
width: 40px; | |
height: 40px; | |
border-radius: 40px; | |
border: none; | |
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><line id="line" x1="40" y1="100" x2="160" y2="100" stroke="white" stroke-width="15" stroke-linecap="round" /></defs><circle cx="100" cy="100" r="100" fill="silver" /><use xlink:href="%23line" transform="rotate(45 100 100)" /><use xlink:href="%23line" transform="rotate(-45 100 100)" /></svg>'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Sirkel</title> | |
<style> | |
button { | |
width: 40px; | |
height: 40px; | |
border-radius: 40px; | |
border: none; | |
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><line id="line" x1="40" y1="100" x2="160" y2="100" stroke="white" stroke-width="15" stroke-linecap="round" /></defs><circle cx="100" cy="100" r="100" fill="silver" /><use xlink:href="%23line" transform="rotate(45 100 100)" /><use xlink:href="%23line" transform="rotate(-45 100 100)" /></svg>'); | |
} | |
</style> | |
</head> | |
<body> | |
<button></button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note! The # is url-encoded. Tested in Safari, Chrome and Firefox on OS X.