Skip to content

Instantly share code, notes, and snippets.

@Saminu
Last active December 28, 2016 09:10
Show Gist options
  • Save Saminu/471e1d46f818c277f5d66468afbd4766 to your computer and use it in GitHub Desktop.
Save Saminu/471e1d46f818c277f5d66468afbd4766 to your computer and use it in GitHub Desktop.
Sofia's Block
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<script>
// Feel free to change or delete any of the code you see in this editor!
var svg = d3.select("body").append("svg")
.attr("width", 960)
.attr("height", 500)
svg.append("rect")
.attr("width", 400)
.attr("height", 100)
.style("fill", "purple")
.attr("x", 260)
.attr("y",150)
svg.append("text")
.text("Truble box")
.attr("y", 200)
.attr("x", 350)
.style("font-size", 36)
.style("font-family", "monospace")
.style("fill", "white")
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment