html - Making a div fade in and out on link hover -


what i'm trying on hovering on link want invisible image fade in. when user stops hovering fades out again. works on hover image appears not work not fade in or out, image appears or disappears.

my html:

<div class="hover_img"><a href="#">action menu<span><img src="img/screenshot/actionmenu.jpg" alt="image" height="50" /></span></a></div> 

my css:

.hover_img { display:inline }  .hover_img { position:static; }  .hover_img span { position:fixed; bottom: 40%; right: 0; display:none; z-index:99; opacity: 0.0; transition: opacity 1s ease-in-out; -moz-transition: opacity 1s ease-in-out; -webkit-transition: opacity 1s ease-in-out; }  .hover_img a:hover span { display:block; opacity: 1.0; transition: opacity .55s ease-in-out; -moz-transition: opacity .55s ease-in-out; -webkit-transition: opacity .55s ease-in-out; } 

remove display:none; , display:block;. transition opacity work correctly.

http://jsfiddle.net/uxgs02qw/`


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -