Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I suggest using an svg for this.</p> <p>I made an example:</p> <pre><code>&lt;svg width="640" height="480" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"&gt; &lt;!-- Created with SVG-edit - http://svg-edit.googlecode.com/ --&gt; &lt;g&gt; &lt;title&gt;Layer 1&lt;/title&gt; &lt;image x="0" y="0" width="640" height="480" id="svg_1" xlink:href="http://kpv.s3.amazonaws.com/static/img/film.jpg"/&gt; &lt;rect fill="#FF0000" stroke="#000000" stroke-width="5" x="92" y="77" width="130" height="79" id="svg_4"/&gt; &lt;rect fill="#FF0000" stroke="#000000" stroke-width="5" x="91.5" y="213" width="130" height="79" id="svg_6"/&gt; &lt;rect fill="#FF0000" stroke="#000000" stroke-width="5" x="91.5" y="338.5" width="130" height="79" id="svg_7"/&gt; &lt;rect fill="#FF0000" stroke="#000000" stroke-width="5" x="281.5" y="195" width="186" height="113.03077" id="svg_8"/&gt; &lt;rect fill="#FF0000" stroke="#000000" stroke-width="5" x="468.5" y="31" width="161" height="97.83847" id="svg_9"/&gt; &lt;rect fill="#FF0000" stroke="#000000" stroke-width="5" x="474.50001" y="306.99999" width="144.99999" height="88.11538" id="svg_10"/&gt; &lt;text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" id="svg_2" y="124" x="157" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"&gt;Asd&lt;/text&gt; &lt;text id="svg_3" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" y="262" x="155" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"&gt;Asd&lt;/text&gt; &lt;text id="svg_5" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" y="387" x="157" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"&gt;Asd&lt;/text&gt; &lt;text id="svg_11" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" y="261" x="374" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"&gt;Asd&lt;/text&gt; &lt;text id="svg_12" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" y="88" x="553" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"&gt;Asd&lt;/text&gt; &lt;text id="svg_14" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" y="357" x="548" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"&gt;Asd&lt;/text&gt; &lt;/g&gt; &lt;/svg&gt; </code></pre> <p>It was created with this tool: <a href="http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html" rel="nofollow">http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html</a></p> <p>Once your svg is done, you can simply link to it in your css background property and voila there you have it, it resizes with the containing element.</p> <p>Or you could calculate each element's position and size in % relative to the containing element and write your css according to that.</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