⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picbox.html

📁 ECSHOP module for themes
💻 HTML
字号:
<html>
<head>
<style type="text/css">
  body
  {
    margin:0px;
    overflow:hidden;
    background-color:#FFFFFF;
  }
  img
  {
      cursor:pointer;
  }
</style>
 <script type="text/javascript" >
 
 var dragy=0,dragx=0;
var dragapproved=false;

function moveF(e)
{
    if (e.button==0)
  {
      window.scrollBy(dragx-e.pageX,dragy-e.pageY);
      dragy=e.pageY;
    dragx=e.pageX;
  }
}

function downF(e)
{
    dragy=e.pageY;
  dragx=e.pageX;
}


if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
    document.onmousedown=function(e)
    {
      document.onmousemove=function(e)
        {
             moveF(e);
        }  
    }
    document.onmouseup=function()
    {
        document.onmousemove=null;
    }
}
else
{
    document.onmousemove=function()
    {
        if ((event.button==0 || event.button==1)&&dragapproved)
      {
        window.scrollBy(dragx-event.clientX,dragy-event.clientY);
        dragy=event.clientY;
        dragx=event.clientX;
        return false;
      }
    }
    document.onmousedown=function()
    {
        dragy=event.clientY;
      dragx=event.clientX;
      dragapproved=true;
    }
    document.onmouseup=function()
    {
        dragapproved=false;
    }
}




function suitImage(img,w,h)
{
    var image=new Image();
        image.src=img.src;

    var iw=image.width;
    var ih=image.height;
    var iratio=iw/ih;
        
        if(iw>w)
    {
                iw=w;
        ih=w/iratio;
        }
        if(ih>h)
    {
                ih=h;
                iw=h*iratio;
        }  
    img.width=iw;
    img.height=ih;
}
 </script>
</head>
<body>
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="middle">
      <img onload="suitImage(this,384,471)" id="objImg" />
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -