在Dan的答案基础上,是我对这个问题的解决方案,直到现在我一直在为此奋斗。(此JS可在iOS
Webkit上运行,不保证适用于android,但请告诉我结果)
var desiredHeight;var desiredWidth;var bodyID = document.getElementsByTagName('body')[0];totalHeight = bodyID.offsetHeight;pageCount = Math.floor(totalHeight/desiredHeight) + 1;bodyID.style.padding = 10; //(optional) prevents clipped letters around the edgesbodyID.style.width = desiredWidth * pageCount;bodyID.style.height = desiredHeight;bodyID.style.WebkitColumnCount = pageCount;
希望这可以帮助…
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)