简体   繁体   中英

Controller background image not working

The background-color works fine, but I can't get the background image to work. It just shows the background colour. The picture is in the same folder as the controller file. I'm using Unity. Picture of the phone . Thank you!

controller.html

<head>    
<style>
    body {
        background-image: url(background.png);
        background-color: white;
         }
</style>
</head>

您忘记在url("background.png")添加引号

Assets for the controller need to be in Assets/WebGLTemplates/AirConsole.
I assume your controller (the file you're working on) is not in that folder, but somewhere else in the project.
There is a controller file in the WebGLTemplates folder, but that one updates automatically to mirror the one linked in the AirConsole object in your scene.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM