淘宝二维码删除

    科技2024-11-09  4

    关闭淘宝二维码

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .box { position: relative; width: 74px; height: 88px; border: 1px solid #ccc; margin: 100px auto; font-size: 12px; text-align: center; color: #f40; } .box img { width: 60px; margin-top: 5px; } .x { position: absolute; top: -1px; left: -16px; width: 14px; height: 14px; border: 1px solid #ccc; line-height: 14px; cursor: pointer; } </style> </head> <body> <div class="box"> 淘宝二维码 <img src="./images/taobao.png" alt="淘宝"> <span class="x">x</span> </div> <script> var btn = document.querySelector('.x'); var box = document.querySelector('.box'); btn.onclick = function(){ box.style.display='none'; } </script> </body> </html>
    Processed: 0.038, SQL: 8