效果图如下:

HTML代码如下:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .left,.right{ position: fixed; top: 250px; } .left{ left: 0; } .right{ right: 0; } .left span,.right span{ width: 20px; height: 20px; background: #ccc; font-size: 14px; color: #333; position: absolute; right: 0; top: 0; text-align: center; cursor: pointer; } </style> <script src="js/jquery-1.12.4.min.js"></script> <script> $(function(){ $('span').click(function(){ $(this).parent().hide(500); }); }) </script></head><body> <div class="left"><img src="images/left.jpg" alt=""><span>X</span></div> <div class="right"><img src="images/right.jpg" alt=""><span>X</span></div></body></html>
------- 知识无价,汗水有情,如需搬运请注明出处,谢谢!
版权声明
本文仅代表作者观点,不代表百度立场。
本文系作者授权百度百家发表,未经许可,不得转载。




