+ 2
How do I make an image go fullscreen (like on facebook) displaying info on one side in HTML?
6 Réponses
+ 4
var img = document.querySelector("img");
img.addEventListener("click",Click);
function Click(){
img.RequestFullScreen();
}
or
img.mozRequestFullScreen();
or
img.webkitRequestFullScreen();
it depends on the browser
+ 1
when you click on it?
+ 1
you need to create hidden div like that :
div
div class=image-wrapper
img
/div
div class=image-info
.... info ....
/div
/div
and you need to show this div when you click on img
0
yes
0
and i have to make the click event in javascript, right?
0
sure