作为three.js所网站的背景可能吗? [英] Three.js as background of website possible?
本文介绍了作为three.js所网站的背景可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在考虑使用three.js所的网站上一个有趣的实验。我想用一个当前实验(对此我已经有code代表),并把它作为我的网站的背景。
I've been looking at using three.js for a fun experiment on a site. I would like to use a current experiment (for which I already have the code for) and use it as a background for my site.
有人知道如何做到这一点?
Anybody know how to do this?
我看到它在这里完成: http://janjorissen.be/
I saw it done here: http://janjorissen.be/
三JS API: https://github.com/mrdoob/three。 JS /维基/ API的参考
推荐答案
我通常使用iframe了点。因此,你没有与基页的冲突。
usually i use iframe for that. Thus you dont have conflict with the base page.
<style>
iframe {
z-index : -9999;
position: absolute;
top : 0;
left : 0;
width : 100%;
height : 100%;
margin : 0;
padding : 0;
}
</style>
<iframe src="http://example.com/"></iframe>
它的一个例子
的https://github.com/jeromeetienne/www.jetienne.com/blob/master/index-webgl.html#L128为源
http://jetienne.com/index-webgl.html 为生活code
这篇关于作为three.js所网站的背景可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文