Note that there are some explanatory texts on larger screens.

plurals
  1. POMake image or div slide up or down when hovering parent div
    primarykey
    data
    text
    <p>I currently have this <a href="http://jsfiddle.net/HwQcf/" rel="nofollow">JSfiddle</a>.</p> <p><strong>HTML:</strong></p> <pre><code> &lt;div class="refTable"&gt; &lt;div class="refRow"&gt; &lt;div class="refCell"&gt;&lt;img src="images/test.jpg" /&gt;&lt;p&gt;Test 1&lt;/p&gt;&lt;/div&gt; &lt;div class="refSep"&gt;&lt;/div&gt; &lt;div class="refCell"&gt;&lt;img src="images/test.jpg" /&gt;&lt;p&gt;Test 2&lt;/p&gt;&lt;/div&gt; &lt;div class="refSep"&gt;&lt;/div&gt; &lt;div class="refCell"&gt;&lt;img src="images/test.jpg" /&gt;&lt;p&gt;Test 3&lt;/p&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>.refTable { display:table; max-width:919px; width:100%; margin:0px auto; } .refRow { display:table-row; } .refCell { display:table-cell; width:291px; text-align: center; font-size:16px; border:1px #ffffff solid; padding:0px 0px 10px 0px; background:#eaeaea; color:#333333; -webkit-border-radius: 20px 20px 20px 20px; border-radius: 20px 20px 20px 20px; resize: none; outline:0; transition-duration: 0.2s; } .refCell img { -webkit-border-radius: 20px 20px 0px 0px; border-radius: 20px 20px 0px 0px; padding-bottom:5px; } .refCell p { line-height: 20px; } .refCell:hover { border-color:#b32f01; background:#ffffff; -webkit-transition: color background 0.2s ease-in-out; -moz-transition: color background 0.2s ease-in-out; -ms-transition: color background -0.8s ease-in-out; -o-transition: color background 0.2s ease-in-out; transition: color background 0.2s ease-in-out; cursor:pointer; color:#cacaca; } .refCell:hover img { opacity:0.4; -webkit-transition: opacity 0.2s ease-in-out; -moz-transition: opacity 0.2s ease-in-out; -ms-transition: opacity -0.8s ease-in-out; -o-transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out; } .refSep { display:table-cell; width:20px; } </code></pre> <p>In the fiddle, no images display in the boxes. However, there normally would be. On hover, the boxes change background color, font color, and, provided there is an image, image opacity. That's fine.</p> <p>Now, I would like to make it so that, on hover, an image or div "slides" up from the bottom/side/top that says <code>"Visit this website"</code>, possibly with some sort of icon.</p> <p>What is the best approach? I've really been thinking about it, but I can't come up with a solution.</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.
 

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