D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
fabi-goetz
Full window
Github gist
My House
Built with
blockbuilder.org
<!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> <svg width="500" height="500"> <g transform="translate(0,-50)"> <!-- sky and base --> <rect style="fill: steelblue" width="500" height="550" x="0" y="0"></rect> <circle style="fill: RGB(0,104,10) " cx="390" cy="550" r="80"></circle> <rect style="fill: green" width="500" height="50" x="0" y="500"></rect> <circle style="fill: RGB(252, 212, 64) " cx="0" cy="30" r="400"></circle> <!-- house base --> <rect style="fill: grey" width="300" height="250" x="100" y="250"></rect> <!-- house door --> <rect style="fill: dark" width="30" height="50" x="250" y="450"></rect> <!-- door above --> <rect style="fill: RGB(100,100,120)" width="30" height="10" x="250" y="450"></rect> <!-- house balcony --> <rect style="fill: RGB(100,100,120)" width="250" height="10" x="120" y="400"></rect> <g transform="translate(0, -100)"> <!-- balcony door --> <rect style="fill: dark" width="30" height="50" x="250" y="450"></rect> <!-- balcony door above --> <rect style="fill: RGB(100,100,120)" width="30" height="10" x="250" y="450"></rect> </g> <!-- balcony bbq --> <circle cx="137" cy="381" r="10"></circle> <rect style="fill: RGB(100,100,120)" width="30" height="23" x="124" y="379"></rect> <!-- hill foreground --> <circle style="fill: RGB(0,104,10) " cx="50" cy="690" r="200"></circle> <!-- flowers --> <g transform="translate(40,439) scale(.1)"> <path d="M0,0 L-40,200 L20,600" style="stroke: #2ecc71; stroke-width: 20px; fill: none;"> </path> <g class="flower"> <circle r="60" transform="rotate(0) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(72) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(144) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(216) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(288) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" style="fill: #f39c12"></circle> </g> </g> <g transform="translate(72,435) scale(.11)"> <path d="M0,0 L-40,200 L20,600" style="stroke: #2ecc71; stroke-width: 20px; fill: none;"> </path> <g class="flower"> <circle r="60" transform="rotate(0) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(72) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(144) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(216) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" transform="rotate(288) translate(40, 0) scale(1.5, 1)" style="fill: #f1c40f"></circle> <circle r="60" style="fill: #f39c12"></circle> </g> </g> <text x="150" y="150" style="font-family: impact, georgia, times, serif; font-weight: normal; font-style: normal">Fabi's Sun Dream House! </text> </g> </svg> </body>
https://d3js.org/d3.v4.min.js