transition与visibility与自带延时隐藏实例页面

回到相关文章 »

代码:

CSS代码:
.trans{
   -webkit-transition:all 0.5s ease;
   -moz-transition:all 0.5s ease;
   -o-transition:all 0.5s ease;
   -ms-transition:all 0.5s ease;
   transition:all 0.5s ease;
}
.image{position:absolute; margin-top:20px; visibility:hidden;}
.hover:hover .image{visibility:visible;}
                
HTML代码:
<div class="hover">
    <img src="//image.zhangxinxu.com/image/study/s/s256/mm1.jpg" class="trans image" />
    <a href="#">经过我显示图片</a>
</div>