Skip to content

Instantly share code, notes, and snippets.

Created January 6, 2016 00:45
Show Gist options
  • Save anonymous/784a8f813286fb06bc30 to your computer and use it in GitHub Desktop.
Save anonymous/784a8f813286fb06bc30 to your computer and use it in GitHub Desktop.
SVG Examples // source https://jsbin.com/kunesu
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Quicksand' rel='stylesheet' type='text/css'>
<title>SVG Examples</title>
<style id="jsbin-css">
.textStyle1 {
font-size: 1em;
fill: green;
font-family: 'Quicksand', sans-serif;
}
.textStyle2 {
font-size: 2em;
fill: darkblue;
font-family: 'Quicksand', sans-serif;
}
</style>
</head>
<body>
<svg width="450" height="250">
<rect x="50" y="50" width="20" height="20" fill="blue"></rect>
<rect x="60" y="60" width="20" height="20" fill="rgba(0,0,0,0.5)" stroke="black"
stroke-width="2"></rect>
<text class="textStyle1" x="80" y="20"> Olá</text>
<text class="textStyle2" x="80" y="45"> Mundo</text>
<\svg>
<script id="jsbin-source-css" type="text/css">.textStyle1 {
font-size: 1em;
fill: green;
font-family: 'Quicksand', sans-serif;
}
.textStyle2 {
font-size: 2em;
fill: darkblue;
font-family: 'Quicksand', sans-serif;
}
</script>
</body>
</html>
.textStyle1 {
font-size: 1em;
fill: green;
font-family: 'Quicksand', sans-serif;
}
.textStyle2 {
font-size: 2em;
fill: darkblue;
font-family: 'Quicksand', sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment