之前在某不知名网站上看到过,觉得好酷炫,当时也没多想怎么写的。

今天正好手头上没有事情在一个技术网站上,又在某技术网站上看到了这个背景,实在是忍不住好奇心,想知道怎么实现的,遂在各个技术群问了一句,没想到真的有人知道。

demo地址: http://www.luoyuhu.com/

 

github地址:https://github.com/hustcc/canvas-nest.js

官方tip:使用方法很简单只需要再body中间插入这段js代码即可,注意不要放在head里面

<html>
<head>
    ...
</head>
<body>
    ...
    ...
    ...
    <script src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
</body>
</html>

配置:颜色:默认是(0,0,0),格式是(R,G,B)

   透明度:(0-1),默认0.5

   线段的数量:默认0.5

     Z轴:默认-1

使用方法:

<script type="text/javascript" color="0,0,255" opacity='0.7' zIndex="-2" count="99" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>

 

相关文章:

  • 2021-12-05
  • 2021-11-28
  • 2023-03-28
  • 2021-11-01
  • 2021-04-20
  • 2021-12-03
  • 2021-12-29
  • 2022-12-23
猜你喜欢
  • 2022-01-19
  • 2021-06-13
  • 2022-12-23
  • 2021-03-31
  • 2021-05-26
相关资源
相似解决方案