I never saw a purple cow,
I never hope to see one.
But I can tell you anyhow
I'd rather see than be one.
I never hope to see one.
But I can tell you anyhow
I'd rather see than be one.
The desired rendering is as follows:
Copyright 2007.
(Beware of Cthulu.)
The solution of the rendered gradient (from gradient.js
) is as follows:
window.onload = function() { var gradient = document.getElementById("gradient"); for (var i = 0; i < 20; i++) { var square = document.createElement("div"); var color = 255 - 10 * i; var xy = 10 * i; var size = 400 - 2 * xy; square.style.backgroundColor = "rgb(" + color + ", " + color + ", " + color + ")"; square.style.width = size + "px"; square.style.height = size + "px"; square.style.position = "absolute"; square.style.left = xy + "px"; square.style.top = xy + "px"; gradient.appendChild(square); } };