如何设置内容宽度==设备宽度?HTML代码:
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes"/>用于页面呈现的div
<style>
body {
background-color: #808080;
margin: 0 auto;
padding: 0;
}
</style>
<div id="pageContainer" class="pdfViewer singlePageView"></div>设置div的css样式
.textLayer > div {
color: transparent;
position: absolute;
white-space: pre;
margin: 0 auto;
cursor: text;
-webkit-transform-origin: 0% 0%;
-moz-transform-origin: 0% 0%;
-o-transform-origin: 0% 0%;
-ms-transform-origin: 0% 0%;
transform-origin: 0% 0%;
}最初的scale == 1.0,但真正的规模比设备更大...
发布于 2016-06-03 10:29:48
@Illya Bublyk你使用的是哪个人行横道版本?请试用一下latest version。
我和WebView相比,页面显示比XWalkView要小一点,你是这个意思吗?
最好在我们的Jira中提交一个新的问题:https://crosswalk-project.org/jira/browse/XWALK并提供示例。
使用WebView时,即使指定了user-scalable=yes,也无法缩放页面。
@bitoiu我没有足够的名气来添加评论,所以我不得不在这里添加答案进行讨论。
https://stackoverflow.com/questions/37261944
复制相似问题