x40*_*404 5 ios cordova inappbrowser
有没有可能在cordova inapprowser的屏幕上放置图像?
如果我使用ref.executeScript设置图像宽度100%的屏幕它是适合但页面的大小仍然大于屏幕,我可以向左滚动
var ref = window.open(path, param, "location=no,suppressesIncrementalRendering=yes,enableViewportScale=yes");
ref.addEventListener('loadstop', function() {
ref.executeScript({
code: "var imageResize = document.querySelectorAll('img'); var screenWidth = window.innerWidth; for (var i = 0; i < imageResize.length; i++) {imageResize[i].style.width = screenWidth + 'px';}" });
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
713 次 |
| 最近记录: |