Robert G asked 2018-02-23 07:13:00 UTC
I tried adding the following inside a <script> tag in default.html:
window.addEventListener('orientationchange', function () {
if (window.orientation == -90) {
document.getElementById('orient').className = 'orientright';
}
if (window.orientation == 90) {
document.getElementById('orient').className = 'orientleft';
}
if (window.orientation == 0) {
document.getElementById('orient').className = '';
}
}, true);
and then added <style> tag to the <head>:
.orientleft #shell {
-webkit-transform: rotate(-90deg);
-webkit-transform-origin:160px 160px;
}
.orientright #shell {
-webkit-transform: rotate(90deg);
-webkit-transform-origin:230px 230px;
}
But it didn't seem to work.
Is there anyway to do this?
Robert G asked 2018-02-23 07:13:00 UTC
I tried adding the following inside a <script> tag in default.html: