问题描述
嗨,我正在尝试禁用Web浏览器对html的缩放。我必须禁用缩放功能,这一点很重要,因为这是我没有发言权的工作任务。
我已经研究了如何禁用缩放,但是由于它仍然无法放大和缩小而影响了网页,因此我必须正确地应用它,因为它无法正常工作。
这是代码,有什么主意吗?
<HTML>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
<style>
table.no-spacing {
border-spacing: 0
margin:0;
border-collapse: collapse;
}
th,td {
padding: 0px;
margin: 0px;
text-align: center;
font-size: 10.96875pt;
font-family: "Segoe UI";
font-weight: Normal;
}
input[type = checkbox] {
display: none;
}
input[type=checkbox] + label:before {
content: '';
display: inline-block;
vertical-align: middle;
margin-right: 5px;
height: 63.7795275590551px;
width: 63.7795275590551px;
background-color: #00256A;
border: 3px solid #009AE1;
color: #009AE1;
float: "left";
}
input[type=checkbox]:checked + label:before {
background-color: #00256A;
content: "\2713";
display: inline-block;
vertical-align: middle;
font-size: 63.7795275590551px;
height: 63.7795275590551px;
width: 63.7795275590551px;
font-family: "Arial";
border: 3px solid #009AE1;
float: "left";
color: #009AE1;
}
.largeFontSize {
background-color: #00256A;
foreground-color: #FFFFFF;
color: #FFFFFF;
font-size:32.90625pt;
font-family: "Segoe UI";
font-weight: Normal;
}
body {
background-color: #00256A;
foreground-color: #FFFFFF;
color: #FFFFFF;
font-size: 10.96875pt;
font-family: "Segoe UI";
font-weight: Normal;
}
input,select {
font-size:32.90625pt;
font-family: "Segoe UI";
font-weight: Normal;
border: none;
}
label,select
{
background-color: #00256A;
foreground-color: #FFFFFF;
color: #FFFFFF;
font-size: 10.96875pt;
font-family: "Segoe UI";
font-weight: Normal;
}
</style>
</head>
<script language="javascript" type="text/javascript">
function CreateDeviceDescription()
{
return "foobar:" + document.getElementById("deviceID").value + "," + document.getElementById("foo").value
}
function ValidateChanges()
{
javascript:window.external.validateDeviceID(CreateDeviceDescription());
}
function GetDeviceDetails()
{
return CreateDeviceDescription();
}
</script>
<BODY bgcolor="#000000">
<div id=Content>
<center>ID<center><input type="text" value="" maxlength="25" size="9" id="deviceID" oninput="ValidateChanges()"/><br><br>
<span style="white-space: nowrap;"><center>Some title<center></span><input type="text" value="" maxlength="7" size="4" id="Freq" oninput="ValidateChanges()"/>
<script>
window.onload = function() {
var bar= document.getElementById("foobar");
bar.focus();
bar.value = bar.value;
};
</script>
</div>
</BODY>
</HTML>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)