Iam developing a fullscreen video site.I want to change page orientation to landscape mode when a users visit the website in smartphone. I tried this using css media orientation but didnt workout.
Pease help me to work this using javascript.
Iam developing a fullscreen video site.I want to change page orientation to landscape mode when a users visit the website in smartphone. I tried this using css media orientation but didnt workout.
Pease help me to work this using javascript.
You cannot change the page (do you mean device?) orientation, you can only detect it (and then modify styles accordingly).
How about rotating the page using css?
-webkit-transform:rotate(-90deg);
-moz-transform:rotate(-90deg);
-ms-transform:rotate(-90deg);
-o-transform:rotate(-90deg);
transform:rotate(-90deg);
if you want to change the orientation of pdf say
var pdf = new BytescoutPDF();
pdf.pageSetOrientation(BytescoutPDF.PORTRAIT); // BytescoutPDF.PORTRAIT = portrait, BytescoutPDF.LANDSCAPE = landscape
pdf.pageAdd();
pdf.textAdd(50, 50, 'Portrait page orientation', 0);
// add a page with landscape orientation
pdf.pageSetOrientation(BytescoutPDF.LANDSCAPE);
pdf.pageAdd();
pdf.textAdd(50, 50, 'Landscape page orientation', 0);
// return BytescoutPDF object instance
return pdf;