Pop-up JS code:
var image=
'<div>' +
' <span style="font-size: 1.5em">title</span>' +
' <hr/>' +
' <p style="margin: 0 0 5px 0; padding: 0">image</p> ' +
' <img src="https://" style="width: calc(100vw - 112px); height: calc(50vh - 112px)">' +
'</div>';
I tested the following code in different devices. How to make pop-up window fit horizontal and vertical screen in different mobile devices as iPad and iPhone with one version code.
And I tested
'<img style="@media screen and (orientation: portrait) { } @media screen and (orientation: landscape) { }">'
in javascript code.Seems doesn’t work.