跳到内容

制作触摸屏注意事项及相关代码

前几天帮团委做了个触摸屏的界面程序,总结如下:
1.触摸屏其实就是一个PC,现在主流的触摸屏是17寸的,所以做的时候大小为1027*768。
2.由于主要是查询功能,所以做的链接按钮一定要大,而且有阅读标记。
3.由于是全屏的,需要屏蔽掉IE的边框,首先新建个open.html页,目的是新弹出个无菜单、状态栏、地址栏等的页面,并关掉自身页,这里弹出的首页为index.html。代码为
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
<title></title>
<script language=”JavaScript” type=”text/JavaScript”>
window.open(&#39;index.html&#39;,&#39;star&#39;,&#39;fullscreen&#39;);
</script>
<OBJECT id=”clo” type=”application/x-oleobject” classid=”clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11″>
<PARAM name=”Command” value=”Close”></OBJECT></head>
<body onload=”window.opener=null;window.close()”>
</body>
</html>
4.上面多余的去掉了,但是还有滚动条用CSS样式去掉,新建个CSS文本,full.css。代码为
body {
text-align: center;
overflow-x:hidden;
overflow-y:hidden;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
background-color: #ffffff;
}
.td1 {
width:138px;
background-color: #ffffff;
background-repeat: no-repeat;
}
.td2 {
height: 49px;
}
5.在每一个页里引用这段CSS代码,head区域里加入如下代码
<link href=”full.css” rel=”stylesheet” type=”text/css”>
<meta http-equiv=”refresh” content=”300; url=../../index.htm”>
多少秒后自动返回主页
6.OK,大功告成!

1 条评论

  1. 出来乍到

    你好,很有用,谢谢!

您的电子邮箱地址不会被公开。 必填项已用 * 标注