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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -