Three.js作为网站的背景可能吗?

编程入门 行业动态 更新时间:2024-10-25 08:23:49
本文介绍了Three.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/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:关键词]

本文发布于:2023-03-28 15:30:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/733732.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:背景   网站   js

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!