[英]meta name="viewport" content="width=device-width" Is not working with Kendo UI Mobile
I am using Kendo UI Mobile framework and I have a min-width: 768px
CSS class assigned to one of my views
because I have table data that can't be compressed anymore.我正在使用 Kendo UI Mobile 框架,并且我有一个
min-width: 768px
CSS 类分配给我的一个views
,因为我有无法再压缩的表数据。 The view shows correctly on a iPad, but when I look at it in a 7" Android Tablet, the view has horizontal scrolling. I need the view to auto zoom out so that the entire view is visible.该视图在 iPad 上正确显示,但是当我在 7" Android 平板电脑中查看它时,该视图具有水平滚动。我需要该视图自动缩小以便整个视图可见。
I can't figure out why this won't work.我不明白为什么这行不通。
Here is my header Meta Tag:这是我的标头元标记:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
Here is my kendo UI view:这是我的剑道 UI 视图:
<div data-role="view" id="main">
<div class="headerWrapper">
<div class="mainHeaderStyleLeft">
<img src="Images/logo.png">
</div>
<div class="mainHeaderStyleRight">
<div class="mainMenuButton"><img src="Images/MenuBttnUnselected.png"></div>
<div class="checklistMenuButton"><img src="Images/MenuBttnUnselected.png"></div>
<div class="reportingMenuButton"><img src="Images/MenuBttnUnselected.png"></div>
<div class="trainingMenuButton"><img src="Images/MenuBttnUnselected.png"></div>
</div>
</div>
</div>
And my view css is simple:我的观点 css 很简单:
#main {
min-width: 768px;
}
.mainMenuButton {
margin-left: 230px;
float: left;
}
.mainMenuButton img{
width: 100px;
height: 100px;
margin-top: 15px;
}
.checklistMenuButton {
margin-left: 10px;
float: left;
}
.checklistMenuButton img{
width: 100px;
height: 100px;
margin-top: 15px;
}
.reportingMenuButton {
margin-left: 10px;
float: left;
}
.reportingMenuButton img{
width: 100px;
height: 100px;
margin-top: 15px;
}
.trainingMenuButton {
margin-left: 10px;
float: left;
}
.trainingMenuButton img{
width: 100px;
height: 100px;
margin-top: 15px;
}
@Rob i face the same problem earlier, and below is my code which will disable zoom.(It will zoomout the screen and make screen stable..) to disable zooming sometimes user-scalable=no; @Rob我之前遇到过同样的问题,下面是我的代码,它将禁用缩放。(它会缩小屏幕并使屏幕稳定..)有时禁用缩放 user-scalable=no; or user-scalable=0;
或用户可扩展=0; does't work in some devices, to make it work in all devices try below code..
在某些设备中不起作用,要使其在所有设备中起作用,请尝试以下代码..
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width; initial-scale=0.9; maximum-scale=0.9; minimum-scale=0.9;" />
making initial-scanle=0.9 and maximamu-scale=0.9 will make screen stable in small screen decies also.使 initial-scanle=0.9 和 maximamu-scale=0.9 也会使屏幕在小屏幕中保持稳定。
in the meta tag add id="main"在元标记中添加 id="main"
hth hth
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.