MUI沈浸式代碼
阿新 • • 發佈:2018-09-30
cti .exe useragent spa top navi pan clas fun
1 var ben_immer = (function() { 2 3 var immersed = 0; 4 var ms = (/Html5Plus\/.+\s\(.*(Immersed\/(\d+\.?\d*).*)\)/gi).exec(navigator.userAgent); 5 6 var set_immersed = function() { 7 8 if(ms && ms.length >= 3) { 9 immersed = parseFloat(ms[2]);10 } 11 12 var cc = 40 + immersed; 13 var t = document.getElementsByClassName(‘mui-bar-nav‘); 14 t[0] && (t[0].style.paddingTop = immersed + ‘px‘); 15 t[0] && (t[0].style.height = (44 + immersed) + ‘px‘); 16 17} 18 19 return { 20 set_immersed: set_immersed 21 } 22 23 })(); 24 25 ben_immer.set_immersed()
MUI沈浸式代碼