android - Make html page don't scroll when height change smaller on mobile device -


i want realize 1080px * 1812px html page in 1 mobile device. , page wrote 1080px * 1920px ui designed before. don't want page scrolls , content must shown in whole page. content of page images , used absolute positions, it's hard change each images. in case of no changing images height attribute, there anyway change height 1812px no matter images of page compressed?

this original code.

<meta name="viewport" content="width=1080; user-scalable=no; target-densitydpi=device-dpi;" /> 

i tried content="width=1080;height=1812;" doesn't work.

use jquery

jquery

$(document).ready(function(){  $(window).load(function(){    var hgt = $(document).height(); // height of document     if(hgt <= $(window).height()){      $('body').css('overflow','hidden');   } else {      $('body').css('overflow','auto');   }   }); }); 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -