浏览器适配屏幕分辨率问题


<script>
         var width=document.documentElement.clientWidth;
         var height=document.documentElement.clientHeight;
         console.log(width)
         console.log(height)
         var sacle=width/1920>height/1080?height/1080:width/1920;
         document.getElementsByTagName('body')[0].style.zoom=sacle;
</script>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM