84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
How to add a p to the p picture with a button link? As shown, who can give me the complete code? Thank you!
Written a simple hover effect for youhttp://jsrun.net/TQYKp
html
<p class='box'> <p class='image'> <img src='http://imgsrc.baidu.com/imgad/pic/item/730e0cf3d7ca7bcbd0a1ac09b4096b63f624a83a.jpg' width='100%'> </p> <p class='mask'> <a class='link' href='#'> 查看更多 </a> </p> </p>
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 }
The most important thing in programming is thinking, and the code implements it by itself. The basic idea is to use position to solve this problem.
Add a mouse move-in removal event, and put a p on the img to make it transparent when removed,
You can do it with display. . Just move it in and out of settings
Written a simple hover effect for you
http://jsrun.net/TQYKp
html
css
The most important thing in programming is thinking, and the code implements it by itself.
The basic idea is to use position to solve this problem.
Add a mouse move-in removal event, and put a p on the img to make it transparent when removed,
You can do it with display. . Just move it in and out of settings