Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
PLASM.it - 2022
Antigravity
FLOW
css
@import url("https://fonts.googleapis.com/css?family=Montserrat:200,300,400,600"); .more-pens { position: fixed; left: 20px; bottom: 20px; z-index: 10; font-family: "Montserrat"; font-size: 12px; } a.white-mode, a.white-mode:link, a.white-mode:visited, a.white-mode:active { font-family: "Montserrat"; font-size: 12px; text-decoration: none; background: #212121; padding: 4px 8px; color: #f7f7f7; } a.white-mode:hover, a.white-mode:link:hover, a.white-mode:visited:hover, a.white-mode:active:hover { background: #edf3f8; color: #212121; } body { margin: 0; padding: 0; overflow: hidden; } .background { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #edf3f8; background: -moz-radial-gradient(center, ellipse cover, #edf3f8 1%, #dee3e8 100%); background: -webkit-radial-gradient(center, ellipse cover, #edf3f8 1%, #dee3e8 100%); background: radial-gradient(ellipse at center, #edf3f8 1%, #dee3e8 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#edf3f8", endColorstr="#dee3e8",GradientType=1 ); } .title { z-index: 10; position: absolute; left: 50%; top: 40%; transform: translateX(-50%) translateY(-50%); font-family: "Montserrat"; text-align: center; width: 60%; } .title h1 { position: relative; color: #000000; font-weight: 300; font-size: 46px; padding: 0; margin: 0; line-height: 1; } .title h2 { font-weight: 600; font-size: 60px; padding: 0; margin: 0; line-height: 1; } .title h3 { font-weight: 200; font-size: 20px; padding: 0; margin: 0; line-height: 2; color: #5e7283; letter-spacing: 2px; } .title p { font-weight: 200; font-size: 16px; color: #5e7283; } .pentahedron { position: absolute; width: 100%; height: 100%; fill: #3E82F7; } .point { fill: #8491A3; } .rhombus { fill: #2DA94F; stroke: #2DA94F; } .x { fill: #FDBD00; } .circle { fill: #ED412D; } svg { display: block; width: 30px; height: 30px; position: absolute; transform: translateZ(0px); }
JavaScript
class Particle { constructor(svg, coordinates, friction) { this.svg = svg; this.steps = $(window).height() / 2; this.item = null; this.friction = friction; this.coordinates = coordinates; this.position = this.coordinates.y; this.dimensions = this.render(); this.rotation = Math.random() > 0.5 ? "-" : "+"; this.scale = 0.5 + Math.random(); this.siner = 200 * Math.random(); } destroy() { this.item.remove(); } move() { this.position = this.position - this.friction; let top = this.position; let left = this.coordinates.x + Math.sin(this.position * Math.PI / this.steps) * this.siner; this.item.css({ transform: "translateX(" + left + "px) translateY(" + top + "px) scale(" + this.scale + ") rotate(" + this.rotation + (this.position + this.dimensions.height) + "deg)" }); if (this.position < -this.dimensions.height) { this.destroy(); return false; } else { return true; } } render() { this.item = $(this.svg, { css: { transform: "translateX(" + this.coordinates.x + "px) translateY(" + this.coordinates.y + "px)" } }); $("body").append(this.item); return { width: this.item.width(), height: this.item.height() }; }} const rhombus = '
'; const pentahedron = '
'; const x = '
'; const circle = '
'; const point = '
'; function randomInt(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); } const data = [point, rhombus, pentahedron, circle, x]; let isPaused = false; window.onblur = function () { isPaused = true; }.bind(this); window.onfocus = function () { isPaused = false; }.bind(this); let particles = []; setInterval(function () { if (!isPaused) { particles.push( new Particle(data[randomInt(0, data.length - 1)], { "x": Math.random() * $(window).width(), "y": $(window).height() }, 1 + Math.random() * 3)); } }, 200); function update() { particles = particles.filter(function (p) { return p.move(); }); requestAnimationFrame(update.bind(this)); } update();
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>反重力流-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号