HTML书状分页

HTML书状分页,第1张

HTML书状分页

在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;

希望这可以帮助…



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5675845.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存