snipt

Ctrl+h for KB shortcuts

CSS

Utilización hover CSS

1
2
3
4
5
6
7
a:link    {color:green;}
a:visited {color:green;}
a:hover   {color:red;}
a:active  {color:yellow;}

a.ex1:hover,a.ex1:active {color:red;}
a.ex2:hover,a.ex2:active {font-size:150%;}
https://snipt.net/embed/9953bf502e09f53332395b5267d78802/
/raw/9953bf502e09f53332395b5267d78802/
9953bf502e09f53332395b5267d78802
css
CSS
8
2019-08-15T08:04:39
True
False
False
Aug 29, 2012 at 03:26 PM
/api/public/snipt/46466/
utilizacion-hover-css
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">a</span><span class="nd">:link</span> <span class="p">{</span><span class="nb">color</span><span class="o">:</span><span class="nb">green</span><span class="p">;}</span> </span><span id="L-2"><a name="L-2"></a><span class="nt">a</span><span class="nd">:visited</span> <span class="p">{</span><span class="nb">color</span><span class="o">:</span><span class="nb">green</span><span class="p">;}</span> </span><span id="L-3"><a name="L-3"></a><span class="nt">a</span><span class="nd">:hover</span> <span class="p">{</span><span class="nb">color</span><span class="o">:</span><span class="nb">red</span><span class="p">;}</span> </span><span id="L-4"><a name="L-4"></a><span class="nt">a</span><span class="nd">:active</span> <span class="p">{</span><span class="nb">color</span><span class="o">:</span><span class="nb">yellow</span><span class="p">;}</span> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="nt">a</span><span class="nc">.ex1</span><span class="nd">:hover</span><span class="o">,</span><span class="nt">a</span><span class="nc">.ex1</span><span class="nd">:active</span> <span class="p">{</span><span class="nb">color</span><span class="o">:</span><span class="nb">red</span><span class="p">;}</span> </span><span id="L-7"><a name="L-7"></a><span class="nt">a</span><span class="nc">.ex2</span><span class="nd">:hover</span><span class="o">,</span><span class="nt">a</span><span class="nc">.ex2</span><span class="nd">:active</span> <span class="p">{</span><span class="nb">font-size</span><span class="o">:</span><span class="m">150%</span><span class="p">;}</span> </span></pre></div> </td></tr></table>
css, hover

CSS

change image opacity on hover

1
2
3
4
5
6
#some-div-name img:hover {
        /* for Chrome, Firefox, & Safari */
	opacity: 0.8;
        /* for IE */
	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80);
}
https://snipt.net/embed/120c2e856b95ffd8e0b1863c0d112bbf/
/raw/120c2e856b95ffd8e0b1863c0d112bbf/
120c2e856b95ffd8e0b1863c0d112bbf
css
CSS
6
2019-08-18T08:51:57
True
False
False
/api/public/snipt/29285/
change-image-opacity-on-hover
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nn">#some-div-name</span> <span class="nt">img</span><span class="nd">:hover</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="c">/* for Chrome, Firefox, &amp; Safari */</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">opacity</span><span class="o">:</span> <span class="m">0</span><span class="o">.</span><span class="m">8</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="c">/* for IE */</span> </span><span id="L-5"><a name="L-5"></a> <span class="n">filter</span><span class="o">:</span><span class="n">progid</span><span class="o">:</span><span class="n">DXImageTransform</span><span class="o">.</span><span class="n">Microsoft</span><span class="o">.</span><span class="n">Alpha</span><span class="p">(</span><span class="nb">opacity</span><span class="o">=</span><span class="m">80</span><span class="p">);</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, hover, image, img, opacity

HTML

cambiar imagen onmouseover

1
2
3
4
<img 
src="ENLACE DE PRIMERA IMÁGEN" 
onmouseover="javascript:this.src='ENLACE SEGUNDA IMÁGEN';" 
onmouseout="javascript:this.src='ENLACE DE PRIMERA IMÁGEN U OTRA';"/>
https://snipt.net/embed/d226f8c3cc39aeb7f22a8e2c52c35023/
/raw/d226f8c3cc39aeb7f22a8e2c52c35023/
d226f8c3cc39aeb7f22a8e2c52c35023
html
HTML
4
2019-08-15T00:48:58
True
False
False
/api/public/snipt/29216/
cambiar-imagen-onmouseover
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">img</span> </span><span id="L-2"><a name="L-2"></a><span class="na">src</span><span class="o">=</span><span class="s">&quot;ENLACE DE PRIMERA IMÁGEN&quot;</span> </span><span id="L-3"><a name="L-3"></a><span class="na">onmouseover</span><span class="o">=</span><span class="s">&quot;javascript:this.src=&#39;ENLACE SEGUNDA IMÁGEN&#39;;&quot;</span> </span><span id="L-4"><a name="L-4"></a><span class="na">onmouseout</span><span class="o">=</span><span class="s">&quot;javascript:this.src=&#39;ENLACE DE PRIMERA IMÁGEN U OTRA&#39;;&quot;</span><span class="p">/&gt;</span> </span></pre></div> </td></tr></table>
cambiar, hover, imagen, onmouseover

CSS

IMG Hover Opacity

1
2
3
a:hover img {
	opacity: .75;
}
https://snipt.net/embed/a0f787bc72f4ebb9469ed4ccb9c4c992/
/raw/a0f787bc72f4ebb9469ed4ccb9c4c992/
a0f787bc72f4ebb9469ed4ccb9c4c992
css
CSS
3
2019-08-18T22:48:11
True
False
False
/api/public/snipt/14605/
img-hover-opacity
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">a</span><span class="nd">:hover</span> <span class="nt">img</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">opacity</span><span class="o">:</span> <span class="o">.</span><span class="m">75</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, hover, image, img, opacity