You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
501 B
23 lines
501 B
<style> |
|
#grid { |
|
display: grid; |
|
grid-template-columns: repeat(27, 9ch); |
|
font-size: 9px; |
|
line-height: 1; |
|
TEXT-ALIGN:CENTER; |
|
|
|
} |
|
</style> |
|
<CENTER> |
|
<div id="grid" STYLE="TEXT-ALIGN:CENTER"></div> |
|
|
|
<script> |
|
const grid = document.getElementById("grid"); |
|
|
|
for (let i = 0; i < 729; i++) { |
|
const ones = (i.toString(3).match(/1/g) || []).length; |
|
const cell = document.createElement("CENTER"); |
|
cell.textContent = "☐".repeat(ones || 1); |
|
grid.appendChild(cell); |
|
} |
|
</script>
|
|
|