码迷,mamicode.com
首页 > Web开发 > 详细

JS淘宝小广告

时间:2020-02-21 14:50:52      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:osi   san   font   get   position   bsp   point   height   pointer   

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
   
    <title>Document</title>
  <style>
      *{
          margin:0;
          padding:0;

      }
      #app{
          width: 295px;
          height: 160px;
          position: relative;
      }
      #app img
      {
            position: absolute;
            right: 0;
      }
      #app #close{
            position: absolute;
            width: 18px;
            height:18px;
            border: 1px solid #e0e0e0;
            text-align: center;
            line-height: 18px;
            cursor: pointer;
      }
  </style>
</head>

<body>
    <div id="app">
        <img src="img/sntk-top-code.png" id="code">
        <span id="close">X</span>
    </div>
    <script>
      var close=document.getElementById(‘close‘);
      var code=document.getElementById(‘app‘);
      close.onclick=function(){
          app.style.display="none"
      }
    </script>
</body>

</html>

JS淘宝小广告

标签:osi   san   font   get   position   bsp   point   height   pointer   

原文地址:https://www.cnblogs.com/lxabner/p/12340983.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!