问题描述
我一直在考虑使用three.js 在网站上进行有趣的实验.我想使用当前的实验(我已经有了它的代码)并将其用作我网站的背景.
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.
有人知道怎么做吗?
我在这里看到了它:http://janjorissen.be/
三个 JS API:https://github/mrdoob/three.js/wiki/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/"></iframe>
一个例子https://github/jeromeetienne/www.jetienne/blob/master/index-webgl.html#L128 为来源http://jetienne/index-webgl.html 活代码
an example of it https://github/jeromeetienne/www.jetienne/blob/master/index-webgl.html#L128 for the source http://jetienne/index-webgl.html for the living code
这篇关于Three.js作为网站的背景可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论