问题
Model URL: https://skfb.ly/KxQr
Browser: Chrome 47.0.2526.111
Description of problem
My problem to do with embedding my model in my personal website. I made a simple HTML file to demonstrate the problem.
<!DOCTYPE html>
<html>
<body bgcolor="#E6E6FA">
<iframe width="700" height="500" src="https://sketchfab.com/models/26f4959eb49b4eaa98044e8f053acc2d/embed?autospin=0.1&autostart=1&&preload=1&transparent=1&scrollwheel=0&ui_stop=0"
frameborder="0"
allowfullscreen mozallowfullscreen="true"
webkitallowfullscreen="true" onmousewheel="">
</iframe>
<p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
</p>
</body>
</html>
This code shows the model without the background so it blends in with the web page. However when it is full screened the background is just black.
If I use this code
<!DOCTYPE html>
<html>
<body bgcolor="#E6E6FA">
<iframe width="700" height="500" src="https://sketchfab.com/models/26f4959eb49b4eaa98044e8f053acc2d/embed?autospin=0.1&autostart=1&&preload=1&transparent=0&scrollwheel=0&ui_stop=0"
frameborder="0"
allowfullscreen mozallowfullscreen="true"
webkitallowfullscreen="true" onmousewheel="">
</iframe>
<p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
</p>
</body>
</html>
The background of the model no longer blends in with the web page, because transparent=0
, and when it is full screened the background is white, as it is meant to be.
Is there a way to embed the model so that it blends in with the web page, like it does when transparent=1
, but when it is full screened it retains either the original background of the model, like it does when transparent=0
which in this case is white, or it retains the colour of the part of the web page it is in, which in this case is #E6E6FA
?
Edit
What it looks like in fullscreen with transparent=1
What it looks like in fullscreen with transparent=0
and what I am trying to make it look like with transparent=1
来源:https://stackoverflow.com/questions/35063887/black-background-in-full-screen-with-embedded-sketchfab