欢迎光临
我们一直在努力

放大镜

建站超值云服务器,限时71元/月

<!— the site is designed by myhyli —>  
<html>
<head>
<title>untitled document</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">

<script language="javascript">
<!–
var zoomvalue=3;
var magnifierw0=100;
var magnifierh0=50;

function init() {
document.body.innerhtml+=<div id="magnifier" style="background-image:url(images/spacer.gif);position:absolute; width:100px; height:50px; z-index:100; left: 0px; top: 0px;border:1px solid #ff0000;visibility:hidden;text-align:right;font-size:10px;font-family:verdana;color:#ff0000;cursor:default;overflow:hidden" onclick="showhide()" onselectstart="return false;">300%</div><div id="zoom" style="background-color:red;position:absolute; width:300px; height:150px; z-index:100; left: 0px; top: 0px;border:1px solid #cccccc;visibility:hidden"><iframe name="zoomiframe" src="about:blank" frameborder="0" scrolling="no" width="100%" height="100%"></iframe></div>;
}

function setposition() {
zoom.style.left=document.body.clientwidth+document.body.scrollleft-5-zoom.offsetwidth;
zoom.style.top=document.body.scrolltop+5;
}

function showhide() {
if (magnifier.style.visibility==hidden) {
    magnifier.style.left=document.body.scrollleft+event.clientx-magnifier.offsetwidth/2;
    magnifier.style.top=document.body.scrolltop+event.clienty-magnifier.offsetheight/2;
    magnifier.style.visibility=visible;
    zoom.style.visibility=visible;
    zoomiframe.location.href=self.location;
    setposition();
    magnifier.setcapture();
    }
else {
    if (event.shiftkey) {
        if (zoomvalue<1) {zoomvalue+=0.1;}
        else {zoomvalue=zoomvalue+1>8?8:zoomvalue+1;}
        magnifier.style.width=3*magnifierw0/zoomvalue;
        magnifier.style.height=3*magnifierh0/zoomvalue;
        magnifier.innertext=parseint(zoomvalue*100)+%;
        }
    else if (event.ctrlkey) {
        if (zoomvalue-1>0) zoomvalue-=1;
        else {if (parseint(zoomvalue*10)/10>0.5) zoomvalue-=0.1;}
        magnifier.style.width=3*magnifierw0/zoomvalue;
        magnifier.style.height=3*magnifierh0/zoomvalue;
        magnifier.innertext=parseint(zoomvalue*100)+%;
        }
    else {
        magnifier.style.visibility=hidden;
        zoom.style.visibility=hidden;
        zoom.style.left=0;
        magnifier.releasecapture();
        }

    }
follow();
}

function follow() {
if (magnifier.style.visibility==visible) {
    magnifier.style.left=document.body.scrollleft+event.clientx-magnifier.offsetwidth/2;
    magnifier.style.top=document.body.scrolltop+event.clienty-magnifier.offsetheight/2;
    zoomiframe.scrollto(magnifier.offsetleft,magnifier.offsettop);
    zoomiframe.document.body.style.zoom=zoomvalue;
    zoomiframe.document.body.style.border=;
    }
}

document.onmousemove=follow;
document.onselectstart=new function(return false;);
document.ondblclick=showhide;
window.onresize=setposition;
window.onload=init;
// –>
</script>
<link rel="stylesheet" href="images/test.css" type="text/css">
</head>

<body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0">
<table width=500 border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
<p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
<p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
<p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
<p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
<p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
</td>
</tr>
</table>
</body>
</html>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 放大镜
分享到: 更多 (0)

相关推荐

  • 暂无文章