Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming you're willing to use CSS3, I created <a href="http://jsbin.com/uxarid/1/edit" rel="nofollow">an example</a> showing one way to get a brief widening effect for the icons (I suppose that is what "dense" means in the question). Reduced code here:</p> <pre><code>.icon { -webkit-transition: 0.25s; transition: 0.25s; } .icon:hover { position: relative; z-index: 1; transform: scale(1.7); -ms-transform: scale(1.7); /* IE 9 */ -webkit-transform: scale(1.7); /* Safari and Chrome */ } </code></pre> <p>The <a href="http://caniuse.com/#feat=transforms2d" rel="nofollow"><code>transform</code></a> property has good support. The effect with <a href="http://caniuse.com/#feat=css-transitions" rel="nofollow"><code>transition</code></a> isn't so well supported (no IE9 support), but if you are thinking on graceful degration, I think it's quite valid to use that.</p> <p><strong>EDIT</strong></p> <p>I'm updating this answer because it could help other people in future. <em>The accepted answer isn't the right approach</em>, since it's using <a href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript#Separation_of_behavior_from_markup" rel="nofollow">obtrusive JavaScript</a> to do things about styling, where CSS is the right tool. I really hope the OP will take a look here and change their code.</p> <p>Based on the OP's feedback, I <a href="http://jsbin.com/uxarid/3/edit" rel="nofollow">updated the example</a> showing how to get a brightness effect simulated by changing the <a href="http://caniuse.com/#feat=css-opacity" rel="nofollow"><code>opacity</code></a> property with a fallback using <code>filter</code> for IE6-8. In short, here's the code:</p> <pre><code>.icon { opacity: 1; filter: Alpha(Opacity=100); } .icon:hover { opacity: .6; filter: Alpha(Opacity=60); } </code></pre> <p>It's easy and works very well when the parent's <code>background-color</code> is lighter than the element. If you need something more elaborated (if you really want changing between two images), I really suggests you to use <a href="http://css-tricks.com/css-sprites/" rel="nofollow">CSS sprites</a>.</p>
    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. 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.
 

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