我是這樣呼叫攝像頭掃描的
function getScanObj() {
if(scanObj && scanObj.isClose) {
scanObj = null;
}
if(!scanObj) {
scanObj = new plus.barcode.Barcode("scanContainer", [plus.barcode.QR, plus.barcode.EAN13, plus.barcode.EAN8], {
background: '#0000FF',
frameColor: '#6495ED',
position: 'static',
top: '15%',
left: 'auto'
});
}
scanObj.onmarked = function(type, code, file) {
plus.nativeUI.toast(code);
scanObj.close();
};
console.log(JSON.stringify(scanObj));
return scanObj;
}效果如下:

掃描視窗怎么調都不能在scanContainer內,top:'15%' 這個屬性沒有效果,請問下大家我要怎么設定呢?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/77004.html
標籤:HTML5
