disable mobile rotation / show notification when phone is landscape
-
-
no there isn't :/
-
-
there is no way to do this!
you can probably show a warning using custom css & custom html that shows up when the phone is in landscape mode using a combination of media queries and html classes
and
body.is-touchdevice
body has a class of "is-touchdevice" when ure on a phone
-
ok heres an example:
custom html at bottom:
<div class="rotate-notification"> <div class="rotate-text _Default_no_spaces">Please rotate your phone</div> </div>custom css:
.rotate-notification{ display:none; z-index: 999999; background-color: black; width: 100%; height: 100vh; position: fixed; top: 0; left: 0; } .rotate-text{ position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white!important; } @media (orientation: landscape) and (max-width: 1024px){ body.is-touchdevice .rotate-notification{ display: block; } }haven't tested it :D
-
instead of doing this you could also do:
in
lay options → Phone Breakpointyou can set this to a higher value, so the phone version would still show up on landscape mode, instead of the desktop version
maybe that looks good enough then
-
Or if you want an image:
<div class="rotate-notification"> <img src="https://media.istockphoto.com/id/1144546554/vector/rotating-phone-from-vertical-to-horizontal-position-phone-vector-icon.jpg?s=612x612&w=0&k=20&c=dnBtqmZ7_8Cjk2UubtE_o1gDkaIMvs1kStk45tzmEiY="> </div>css:
.rotate-notification{ display:none; z-index: 999999; background-color: black; width: 100%; height: 100vh; position: fixed; top: 0; left: 0; } .rotate-notification img{ position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150px; } @media (orientation: landscape) and (max-width: 1024px){ body.is-touchdevice .rotate-notification{ display: block; } }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login