Home > Web Front-end > H5 Tutorial > body text

知乎的登录首页背景动画是怎么做到的?JS还是CSS3,求教

WBOY
Release: 2016-06-07 08:44:08
Original
2292 people have browsed it

回复内容:

是 particles.js 的 demo

github.com/VincentGarre 正好昨天写了一个类似的,可以参考一下
https://github.com/hilongjw/Qarticles GitHub - VincentGarreau/particles.js: A lightweight JavaScript library for creating particles
github 你值得拥有
很老的一个项目了
拿回来改改样式
套页面上就完事了 知乎用的是楼上说的插件,但是其实几十行就能实现,生成指定个数的随机坐标点,给每个点不同的初速度使之运动,连接每个点与其他所有点生成多个连线,点与点之间的距离小于一个范围两点间连线透明度变为1,大于一个范围透明度变为0,每隔一段时间间隔重新更新画布,根据速度改变坐标,遇到屏幕边界穿过在屏幕相对应的位置出现,告诉你思路,就是不到一百行的js和一个canvas标签的事。
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!