Screenfit is a cross-platform and cross-platform web view solution that 100% fits any webpage. This JavaScript library makes your page well-suited for a screen across all browsers and platforms.
display a part of the webpage on the webview, webview resize to fit content, how to make webview responsive, webview load url, android webview fit content height
How to make use of it:
1. Enable the screenfit by merely together with the primary JavaScript in your webpage.
<!-- CDN --> <script defer src="https://unpkg.com/screenfit"></script> <!-- Local --> <script defer src="min.js"></script>
2. Load polyfills for Kindle and Internet Explorer if needed.
<script data-polyfill=kindle> if(!Object.bind)document.write('<script src="js/kindle.js"><\x2fscript>'); </script> <script data-polyfill=ie11>try{ new CustomEvent('InternetExplorer')} catch(_){ document.write('<script src="js/ie.js"><\x2fscript>') } </script>
3. Track display size modifications and get the present data.
addEventListener('screenfit', function (event) { document.body.className = 'fit'; document.querySelector('footer').textContent = [ 'current: ' + Math.round(event.detail.height), 'inner: ' + Math.round(innerHeight), 'avail: ' + Math.round(screen.availHeight) ].join(' - '); console.log(Math.random()); });
Make Webpage 100% Fit On The Screen, screenfit Plugin/Github, webview set width and height programmatically
See Demo And Download
Official Website(WebReflection): Click Here
This superior jQuery/javascript plugin is developed by WebReflection. For extra Advanced Usages, please go to the official website.