<web-view style="width: 100%; height: 100%;position: absolute;background-color: transparent;" src="/hybrid/html/local.html"></web-view>
onReady() {
// #ifdef APP-PLUS
let currentWebview = this.$mp.page.$getAppWebview();
setTimeout(function() {
let wv = currentWebview.children()[0];
wv.setStyle({top: 134, height:70, right: 0});
}, 1000);
// #endif
},
这样虽然将webview的宽高固定到理想位置,但是并不能岁页面的滚动而滚动,背景色也不能设置为透明色,尝试着设置上面的样式,最后都失败了
2 个回复
9***@qq.com
遇到同样需求, 求解
末学门丰 - 工作室开发者
同求