三.js作为网站背景可以吗? [英] Three.js as background of website possible?

查看:20
本文介绍了三.js作为网站背景可以吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在考虑使用 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.com/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.com/"></iframe> 

一个例子https://github.com/jeromeetienne/www.jetienne.com/blob/master/index-webgl.html#L128 为源http://jetienne.com/index-webgl.html 活代码

an example of it https://github.com/jeromeetienne/www.jetienne.com/blob/master/index-webgl.html#L128 for the source http://jetienne.com/index-webgl.html for the living code

这篇关于三.js作为网站背景可以吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆