Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can apply background images to images using CSS, then use a load of transparent .png images for the letters.</p> <p>I mocked it up:</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;style type="text/css"&gt; img.leaves { background:url("leaves.png"); } img.lights { background:url("lights.png"); } &lt;/style&gt; &lt;script type="text/javascript"&gt; function makeText() { var text = document.getElementById('text').value.toUpperCase(); var pattern = document.getElementById('pattern').value; for(var i=0; i&lt;text.length; i++) { var img = document.createElement('img'); img.src=text[i]+'.png'; img.className=pattern; document.getElementById('textArea').appendChild(img); } return false; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form onsubmit="return makeText();"&gt; &lt;p&gt;&lt;label for="text"&gt;Enter your text&lt;/label&gt; &lt;input type="text" name="text" id="text" size="20"&gt;&lt;/p&gt; &lt;p&gt;&lt;label for="pattern"&gt;Choose a pattern&lt;/label&gt; &lt;select id="pattern"&gt;&lt;option value="leaves"&gt;Leaves&lt;/option&gt;&lt;option value="lights"&gt;Lights&lt;/option&gt;&lt;/select&gt;&lt;/p&gt; &lt;p&gt;&lt;input type="submit" value="Make!"&gt;&lt;/p&gt; &lt;/form&gt; &lt;div id="textArea"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and you can also <a href="http://www.subdimension.co.uk/files/1/SO/letters.html" rel="nofollow noreferrer">see it in action</a>.</p> <p><a href="http://www.subdimension.co.uk/files/1/SO/A.png" rel="nofollow noreferrer">alt text http://www.subdimension.co.uk/files/1/SO/A.png</a> &lt; this is one of the letter cutouts (difficult to see!)</p> <p><a href="http://www.subdimension.co.uk/files/1/SO/leaves.png" rel="nofollow noreferrer">alt text http://www.subdimension.co.uk/files/1/SO/leaves.png</a> and one of the background patterns.</p> <p>I got bored at G, so you can only write words that contain the letters a-g, it's also a little lazy in that it only does upper case and there are only 2 patterns but hopefully it should be enough to give you an idea</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload