picturepan2/devices.css

put an ifame in the screen space

Opened this issue · 3 comments

i want to know if i could put an iframe to call another webpage in the screen space

@bucktechnologies I was curious of the same thing, so i made a test page. Only need to replace the scrollbar with something else, but other than that it worked fine.

https://codepen.io/terreporter/full/zXBdvM

This works fine in Firefox and Chrome but in Safari the content within the iframe gets positioned outside of the device frame over to the left. It's a weird bug.

I'll update here if I find a solution.

UPDATE: Pretty easy fix. Wrap the iframe in a div and add the device-content class to it. You'll also want to add overflow: hidden.

device-content has been deprecated. Use device-screen.