Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ul> <li><em>Glows</em>: use <code>box-shadow</code></li> <li><em>Appears darker</em>: change the <code>background</code> a bit or apply a mask (mask could be a pseudo-element over it);</li> <li><em>Moves slightly</em>: change <code>margin</code> or use a <code>translate</code> <code>transform</code>;</li> <li><em>Grows slightly bigger</em>: change <code>width</code> and <code>height</code> or use a <code>scale</code> <code>transform</code>;</li> </ul> <p>For the second two, I'd recommend <code>transform</code>s. They are <a href="http://caniuse.com/#feat=transforms2d" rel="nofollow"><strong>supported by Android</strong></a> and have the advantage that moving or scaling the link won't disturb (= move) the elements around it.</p> <p><a href="http://dabblet.com/gist/3163300" rel="nofollow"><strong>Demo</strong></a> (keep mouse button pressed to see effects)</p> <p>Relevant CSS:</p> <pre><code>.glow:active { box-shadow: 0 0 15px #fe0; } .darker:active { background: goldenrod; } .move:active { margin-left: 50px; } /* moves elements at its right */ .move2:active { transform: translateX(15px); } .bigger:active { width: 120px; height: 66px; } /* moves alements after it */ .bigger2:active { transform: scale(1.1); } </code></pre> <hr> <p><strong>NOTE</strong>: For <code>transform</code>s you need to add the prefixed versions before the unprefixed version as no current version of any browser supports the unprefixed version (IE 10 and Firefox 16 have been announced to support transforms unprefixed):</p> <pre><code>.move:active { -webkit-transform: translateX(15px); /* the one you need for Android */ /* if your app is ONLY for Android, you can leave the next three out */ -moz-transform: translateX(15px); -ms-transform: translateX(15px); -o-transform: translateX(15px); transform: translateX(15px); /* always write it last */ } .bigger:active { -webkit-transform: scale(1.1); /* the one you need for Android */ /* if your app is ONLY for Android, you can leave the next three out */ -moz-transform: scale(1.1); -ms-transform: scale(1.1); -o-transform: scale(1.1); transform: scale(1.1); /* always write it last */ } </code></pre> <p>Same thing is valid if you want smooth <code>transition</code>s:</p> <pre><code>a.ui-link-test { -webkit-transition: .5s; /* the one you need for Android */ /* if your app is ONLY for Android, you can leave the next three out */ -moz-transition: .5s; -ms-transition: .5s; -o-transition: .5s; transition: .5s; /* always write it last */ } </code></pre>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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