Background/element goes black when entering Fullscreen with HTML5

前端 未结 7 1591
旧时难觅i
旧时难觅i 2020-12-29 22:51

I\'m using the following script to make my web app go fullscreen...

function enterFullscreen(){
    var element = document.getElementById(\'container\');
            


        
7条回答
  •  天命终不由人
    2020-12-29 23:23

    I don't know the exact answer to your question, but this information might help:

    I had a similar black background problem with enterFullscreen(document.body);. The background color became normal after I changed the line to enterFullscreen(document.documentElement);. The css I used is body{background-color: #D7D7D7; margin: 0px;}.

提交回复
热议问题