<!DOCTYPE html>
<html>
<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>悦玩网络</title>
  <link rel="stylesheet" href="./css/reset.css">
  <link rel="stylesheet" href="./css/common.css">
  <style>
    .container .banner {
      width: 100%;
    }

    .container .content {
      width: 1100px;
      position: relative;
      top: -24px;
      margin: 0 auto 16px;
      padding: 0 60px;
      box-sizing: border-box;
      background: #FFFFFF;
      box-shadow: 0 1px 4px 0 rgba(197, 211, 218, 0.30);
      border-radius: 3px;
    }

    
    .banner-container {
      width: 100%;
      padding: 56px 0 100px 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
  </style>
</head>
<body>
  <div class="mask" id="mask"></div>
  <nav class="navigate">
    <div class="logo">
      <img src="./img/logo.png" alt="爱悦玩">
    </div>
    <ul class="menus">
      <li class="active"><a href="./index.html">首页</a></li>
      <li class="contact"><a href="./contact.html">联系我们</a></li>
    </ul>
  </nav>
  <div class="banner-container">
    <img src="./img/0.png" alt="">
    <img src="./img/1.png" alt="">
    <img src="./img/2.png" alt="">
  </div>
  
  <footer class="footer">
    <div class="content">
      <p class="filing">
        <a href="http://beian.miit.gov.cn/" target="_blank">
          <span class="filing-number">粤ICP备15101454号</span>
        </a>
      </p>
      <p>Copyright © 广州悦玩网络科技有限公司</p>
      <p class="filing">
        <img src="img/police_logo.png" alt=""  class="police_logo">
        <a href="http://beian.mps.gov.cn/#/query/webSearch" target="_blank">
          <span>粤公网安备44010602014405号</span>
        </a>
      </p>
    </div>
    <!-- <a href="http://webscan.360.cn/index/checkwebsite/url/iyuewan.cn"><img border="0" src="http://webscan.360.cn/status/pai/hash/c5cb980e70eb1ed083a6fedbb4fabffa"/></a> -->
  </footer>

  <script>
    const body = document.body
    const html = document.getElementsByTagName('html')[0]
    const maskEl = document.getElementById('mask')
    let hasModal = false
    let mouseFlag = true

    function showModal(src) {
      if (!hasModal) {
        const modalEl = document.createElement('div')
        const closeEl = document.createElement('span')
        const embedEl = document.createElement('embed')

        html.style.overflow = 'hidden'
        maskEl.style.display = 'block'
        closeEl.classList.add('close')
        closeEl.innerHTML = '&times;'
        closeEl.onclick = closeModal
        embedEl.src = src
        embedEl.classList.add('embed')

        modalEl.setAttribute('id', 'modal')
        modalEl.appendChild(closeEl)
        modalEl.appendChild(embedEl)
        modalEl.classList.add('modal')
        modalEl.classList.add('show')
        body.appendChild(modalEl)
        moveEl(modalEl)
        hasModal = true
      }
    }

    function closeModal() {
      if (hasModal) {
        const modalEl = document.getElementById('modal')

        html.style.overflow = 'auto'
        maskEl.style.display = 'none'
        modalEl.classList.remove('show')
        modalEl.classList.add('hide')
        modalEl.addEventListener('animationend', () => {
          body.removeChild(modalEl)
          hasModal = false
        })
      }
    }

    function moveEl(el) {
      el.onmousedown = e => {
        if (e.target !== el) return

        const elClientX = e.clientX
        const elClientY = e.clientY
        const elOffsetLeft = el.offsetLeft
        const elOffsetTop = el.offsetTop
        mouseFlag = true

        document.onmousemove = e => {
          if (!mouseFlag) return
          const docClientX = e.clientX
          const docClientY = e.clientY
          el.style.left = docClientX - elClientX + elOffsetLeft + 'px'
          el.style.top = docClientY - elClientY + elOffsetTop + 'px'
        }
      }

      document.onmouseup = () => {
        mouseFlag = false
      }
    }
  </script>
</body>
</html>
