当前位置: 动力学知识库 > 问答 > 编程问答 >

php - fill jQuery mobile page with long text like an e-reader

问题描述:

Okay, so this is what I am trying to do with jQuery Mobile

I have a long text file. I am trying to display it on a mobile device so that it fills the entire screen. I have been trying to put the text into a div and then keep creating new divs until all of the text are in divs one following another.

"Just like you would view with an e-reader."

Of course, this has to be dynamic because of the different mobile screen sizes.

The best I can come up with is adding one character at a time until it reaches the height of the div but the often characters don't end at the left margin. They end somewhere in between.

I have tried PHP, jQuery, and plugins that use ellipses. I'm stuck. I would be happy if I could get the overflow into a new div and then that overflow into a new div and so on...

If anyone has a solution and maybe put it in a Fiddle, you would make my year!

Thanks!

分享给朋友:
您可能感兴趣的文章:
随机阅读: