Created
July 24, 2017 09:14
-
-
Save mashiro/01991f162c8868c3c8b2d8ceda8add03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function() { | |
var body = document.getElementsByTagName("body")[0]; | |
var canvas = document.createElement("canvas"); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 400; | |
canvas.height = 250; | |
ctx.font = "bold 48px sans-serif"; | |
ctx.fillStyle = "rgba(0, 0, 0, 0.1)"; | |
ctx.rotate(30 * Math.PI / 180); | |
ctx.textBaseline = "middle"; | |
ctx.fillText("development", 30, 30); | |
body.style.backgroundImage = "url("+canvas.toDataURL()+")"; | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment