+ 2

How do I make an image go fullscreen (like on facebook) displaying info on one side in HTML?

16th Mar 2017, 1:51 PM
Stefan Doncean
Stefan Doncean - avatar
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
16th Mar 2017, 8:52 PM
Emore Anzolin
Emore Anzolin - avatar
+ 1
when you click on it?
16th Mar 2017, 2:36 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 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
16th Mar 2017, 2:43 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
yes
16th Mar 2017, 2:37 PM
Stefan Doncean
Stefan Doncean - avatar
0
and i have to make the click event in javascript, right?
16th Mar 2017, 2:51 PM
Stefan Doncean
Stefan Doncean - avatar
0
sure
16th Mar 2017, 2:53 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar