给你写了一个简单的hover效果http://jsrun.net/TQYKp html <div class='box'> <div class='image'> <img src='http://imgsrc.baidu.com/imgad/pic/item/730e0cf3d7ca7bcbd0a1ac09b4096b63f624a83a.jpg' width='100%'> </div> <div class='mask'> <a class='link' href='#'> 查看更多 </a> </div> </div> css .mask { background: #ff00a5; width: 300px; height: 200px; position: absolute; top: 0; z-index: 99; display: none } .image { width: 300px; height: 200px; } .box { position: relative; width: 300px; } .box:hover .mask { display: block; } .box:hover .link { width: 120px; height: 40px; display: block; background: #FFF; line-height: 40px; text-align: center; margin: 80px auto; color: #ff00a5 }
给你写了一个简单的hover效果
http://jsrun.net/TQYKp
html
css