详细问题描述
[内容]
目前测试发现创建webview时添加style left 100%导致loadURL网页不显示,但是会加载出来,不添加 left 100% 可以显示
重现步骤
[步骤]
[结果]
[期望]
运行环境
[系统版本]
[浏览器版本]
[IDE版本]HBuilder
8.0.2.201703290236-alpha
[mui版本]
附件
[代码片段]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Webview Example</title>
<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var ws = null,
wn = null;
function plusReady() {
ws = plus.webview.currentWebview();
wn = plus.webview.create('', 'webvieBUG',{left:"100%"});
wn.drag({direction: 'right',moveMode: 'followFinger'},
{view: ws,moveMode: 'follow'}, function(e) {
console.log('Right drag event: ' + JSON.stringify(e));
});
}
if(window.plus) {
plusReady();
} else {
document.addEventListener("plusready", plusReady, false);
}
function webviewAnimation() {
var view = new plus.nativeObj.View("viewBug", {
top: 0,
height: "44px",
width: "100%",
dock: "top",
position: "dock"
});
view.drawRect("#000000");
wn.append(view)
wn.show('none');
plus.webview.startAnimation({view: ws,styles: {fromLeft: '0%',toLeft: '-100%'},action: 'none'},
{view: wn,styles: {fromLeft: '100%',toLeft: '0%'},action: 'none'},
function(e) {
wn.loadURL('http://m.weibo.cn/u/3196963860')
console.log('Animation finished: ' + JSON.stringify(e));
});
}
</script>
</head>
<body>
<br/><br/>
<button onclick="webviewAnimation()">窗口组合动画显示新窗口</button>
</body>
</html>
[安装包]
联系方式
[QQ]
[电话]