blasten / turn.js

The page flip effect for HTML5
www.turnjs.com
Other
7.18k stars 2.46k forks source link

Trouble with responsive design #640

Closed magusMartti closed 2 years ago

magusMartti commented 4 years ago

Hello! If this is a duplicate question, I am sorry. This is an awesome plugin, I've had tons of fun with it. But Im having problems with mobile design, I am trying to make flipbook take up the entire screen size with mobile, but no luck so far. If any of you have some tips, that would be awesome.

RaffaeleMorganti commented 4 years ago

There is size method to resize. Simply set pages size to full width/height. $('#viewer').turn('size', width, height) You need to calculate them to fit the page and keep aspect ratio.

magusMartti commented 4 years ago

Ty for the info, If its not too much trouble, can you give me an example? with some random heights/widths? Because at the moment, im trying to figure out how to make it display single page when mobile, and that one single page should take up the entire screen width/height