Note that there are some explanatory texts on larger screens.

plurals
  1. POsimple CSS animation, should I be doing this in canvas or SVG?
    primarykey
    data
    text
    <p>the first two keys are operational (leftmost key, and the black key right next to it). here it is hosted so you can see</p> <pre><code>http://23.23.184.26/miller/keyboardanimation/main.html </code></pre> <p>I have to redraw the WHOLE keyboard because the 3d nature of each key does not leave a square profile that I can replace with a square image. I don't see support anywhere for trapezoidal elements...</p> <p>Should I be doing this in SVG or canvas or something? I feel like the way I'm doing this is really dumb.</p> <p>And, I'm getting a wierd white flash between transitions sometimes (on IE9 only tho I think)</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; a{ color:white; } #main{ background:white url('0.gif') no-repeat 0 0; position:relative; z-index:0; width:506px; height:319px; } #key1{ position:absolute; width:50px; height:75px; top:175px; left:55px; } #key2{ position:absolute; width:50px; height:75px; top:100px; left:85px; } /*uncomment this to show button zones*/ /*#key1:hover, #key2:hover{ border:1px solid red; }*/ &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="main"&gt; &lt;div id="key1" onMouseDown="document.getElementById('main').style.background = 'url(1.gif)'" onMouseUp="document.getElementById('main').style.background = 'url(0.gif)'"&gt;&lt;/div&gt; &lt;div id="key2" onMouseDown="document.getElementById('main').style.background = 'url(2.gif)'" onMouseUp="document.getElementById('main').style.background = 'url(0.gif)'"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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