前端开发 之 12个鼠标交互特效上【附完整源码】

前端开发 之 12个鼠标交互特效上【附完整源码】

文章目录

  • 前端开发 之 12个鼠标交互特效上【附完整源码】
      • 一:彩色空心爱心滑动特效
          • 1.效果展示
          • 2.`HTML`完整代码
      • 二:彩色实心爱心滑动特效
          • 1.效果展示
          • 2.`HTML`完整代码
      • 三:粒子连结特效
          • 1.效果展示
          • 2.`HTML`完整代码
      • 四:彩色拖尾特效
          • 1.效果展示
          • 2.`HTML`完整代码
      • 五:彩色粒子收回特效
          • 1.效果展示
          • 2.`HTML`完整代码
      • 六:彩色粒子交互特效
          • 1.效果展示
          • 2.`HTML`完整代码

一:彩色空心爱心滑动特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!doctype html>
<html>
<head><meta charset="utf-8"><title>超级炫酷的爱心滑动特效</title><style>body {overflow: hidden;margin: 0;background: #222;}canvas {display: block;}</style>
</head><body><canvas></canvas><script>var canvas = document.querySelector("canvas"),ctx = canvas.getContext("2d");var ww, wh;function onResize() {ww = canvas.width = window.innerWidth;wh = canvas.height = window.innerHeight;}function randomColor() {return `hsla(${Math.random() * 360}, 100%, 60%, 1)`;}var precision = 100;var hearts = [];var mouseMoved = false;function onMove(e) {mouseMoved = true;for (let i = 0; i < 5; i++) { // 生成更多的爱心let x, y;if (e.type === "touchmove") {x = e.touches[0].clientX;y = e.touches[0].clientY;} else {x = e.clientX;y = e.clientY;}hearts.push(new Heart(x, y));}}var Heart = function (x, y) {this.x = x || Math.random() * ww;this.y = y || Math.random() * wh;this.size = Math.random() * 4 + 1;this.shadowBlur = Math.random() * 20;this.speedX = (Math.random() - 0.5) * 10;this.speedY = (Math.random() - 0.5) * 10;this.speedSize = Math.random() * 0.05 + 0.01;this.opacity = 1;this.color = randomColor();this.vertices = [];for (var i = 0; i < precision; i++) {var step = (i / precision - 0.5) * (Math.PI * 2);var vector = {x: (15 * Math.pow(Math.sin(step), 3)),y: -(13 * Math.cos(step) - 5 * Math.cos(2 * step) - 2 * Math.cos(3 * step) - Math.cos(4 * step))}this.vertices.push(vector);}}Heart.prototype.draw = function () {this.size -= this.speedSize;this.x += this.speedX;this.y += this.speedY;ctx.save();ctx.translate(this.x, this.y);ctx.scale(this.size, this.size);ctx.beginPath();ctx.strokeStyle = this.color;ctx.shadowBlur = this.shadowBlur;ctx.shadowColor = this.color;for (var i = 0; i < precision; i++) {var vector = this.vertices[i];ctx.lineTo(vector.x, vector.y);}ctx.globalAlpha = this.size;ctx.closePath();ctx.stroke();ctx.restore();};function render(a) {requestAnimationFrame(render);ctx.clearRect(0, 0, ww, wh);for (var i = 0; i < hearts.length; i++) {hearts[i].draw();if (hearts[i].size <= 0) {hearts.splice(i, 1);i--;}}}onResize();window.addEventListener("mousemove", onMove);window.addEventListener("touchmove", onMove);window.addEventListener("resize", onResize);requestAnimationFrame(render);</script>
</body>
</html>

二:彩色实心爱心滑动特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!doctype html>
<html>
<head><meta charset="utf-8"><title>滑动爱心</title><style>body {overflow: hidden;margin: 0;background: linear-gradient(to right, #ff9a9e, #fad0c4);height: 100vh;display: flex;justify-content: center;align-items: center;}canvas {position: absolute;top: 0;left: 0;}</style>
</head>
<body><canvas></canvas><script>var canvas = document.querySelector("canvas"),ctx = canvas.getContext("2d");var ww, wh;function onResize() {ww = canvas.width = window.innerWidth;wh = canvas.height = window.innerHeight;}var precision = 50;var hearts = [];var mouseMoved = false;function onMove(e) {mouseMoved = true;var x, y;if (e.type === "touchmove") {x = e.touches[0].clientX;y = e.touches[0].clientY;} else {x = e.clientX;y = e.clientY;}hearts.push(new Heart(x, y));}var Heart = function (x, y) {this.x = x || Math.random() * ww;this.y = y || Math.random() * wh;this.size = Math.random() * 2 + 1;this.maxSize = this.size * 1.5;this.shadowBlur = Math.random() * 15;this.speedX = (Math.random() - 0.5) * 4;this.speedY = (Math.random() - 0.5) * 4;this.alpha = 1;this.fadeSpeed = Math.random() * 0.02 + 0.02;this.color = `hsl(${Math.random() * 360}, 100%, 50%)`;this.vertices = [];for (var i = 0; i < precision; i++) {var step = (i / precision - 0.5) * (Math.PI * 2);var vector = {x: (15 * Math.pow(Math.sin(step), 3)),y: -(13 * Math.cos(step) - 5 * Math.cos(2 * step) - 2 * Math.cos(3 * step) - Math.cos(4 * step))}this.vertices.push(vector);}}Heart.prototype.draw = function () {this.x += this.speedX;this.y += this.speedY;this.size += (this.maxSize - this.size) * 0.1;this.alpha -= this.fadeSpeed;ctx.save();ctx.translate(this.x, this.y);ctx.scale(this.size, this.size);ctx.beginPath();ctx.moveTo(0, 0);for (var i = 0; i < precision; i++) {var vector = this.vertices[i];ctx.lineTo(vector.x, vector.y);}ctx.closePath();ctx.fillStyle = this.color;ctx.globalAlpha = this.alpha;ctx.shadowBlur = this.shadowBlur;ctx.shadowColor = this.color;ctx.fill();ctx.restore();};function render(a) {requestAnimationFrame(render);ctx.clearRect(0, 0, ww, wh);for (var i = 0; i < hearts.length; i++) {hearts[i].draw();if (hearts[i].alpha <= 0) {hearts.splice(i, 1);i--;}}}onResize();window.addEventListener("mousemove", onMove);window.addEventListener("touchmove", onMove);window.addEventListener("resize", onResize);requestAnimationFrame(render);</script>
</body>
</html>

三:粒子连结特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Enhanced Particle System with Cool Effects</title><style>body {margin: 0;overflow: hidden;background: linear-gradient(45deg, #000, #333);animation: bgGradient 10s ease infinite;}@keyframes bgGradient {0% { background-position: 0% 50%; }50% { background-position: 100% 50%; }100% { background-position: 0% 50%; }}canvas {display: block;}</style>
</head>
<body><canvas id="particleCanvas"></canvas>
</body>
<script>
const canvas = document.getElementById('particleCanvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;let particlesArray = [];
const numberOfParticles = 50;
const mouse = {x: undefined,y: undefined,
};
const maxParticleLifeTime = 1; class Particle {constructor(x, y, initialLife = 1) {this.x = x || Math.random() * canvas.width;this.y = y || Math.random() * canvas.height;this.size = Math.random() * 2 + 1;this.speedX = (Math.random() - 0.5) * 2;this.speedY = (Math.random() - 0.5) * 2;this.color = `hsl(${Math.random() * 360}, 100%, 50%)`;this.alpha = 1;this.decay = Math.random() * 0.01 + 0.01;this.life = initialLife;this.trail = [];this.lifeTime = 0; }update() {this.x += this.speedX;this.y += this.speedY;if (this.x > canvas.width || this.x < 0) this.speedX *= -1;if (this.y > canvas.height || this.y < 0) this.speedY *= -1;if (mouse.x && mouse.y) {const dx = mouse.x - this.x;const dy = mouse.y - this.y;const distance = Math.sqrt(dx * dx + dy * dy);const force = 1 / distance * 20;this.speedX += (dx / distance) * force;this.speedY += (dy / distance) * force;}this.life -= this.decay;this.alpha = this.life;this.color = `hsl(${(1 - this.life) * 360}, 100%, 50%)`;this.lifeTime += 1 / 60; if (this.life <= 0 || this.lifeTime >= maxParticleLifeTime) {this.reset();}this.trail.push({ x: this.x, y: this.y });if (this.trail.length > 15) this.trail.shift();for (let otherParticle of particlesArray) {if (otherParticle !== this) {const dx = this.x - otherParticle.x;const dy = this.y - otherParticle.y;const distance = Math.sqrt(dx * dx + dy * dy);if (distance < 50) {const repelForce = 0.1 / distance;this.speedX -= (dx / distance) * repelForce;this.speedY -= (dy / distance) * repelForce;}}}}draw() {ctx.globalAlpha = this.alpha;ctx.fillStyle = this.color;ctx.beginPath();ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.globalAlpha = 0.7 * this.alpha;ctx.beginPath();for (let i = 0; i < this.trail.length; i++) {ctx.lineTo(this.trail[i].x, this.trail[i].y);}ctx.strokeStyle = this.color;ctx.lineWidth = 0.5;ctx.stroke();ctx.closePath();}reset() {this.x = Math.random() * canvas.width;this.y = Math.random() * canvas.height;this.size = Math.random() * 2 + 1;this.speedX = (Math.random() - 0.5) * 4;this.speedY = (Math.random() - 0.5) * 4;this.color = `hsl(${Math.random() * 360}, 100%, 50%)`;this.alpha = 1;this.life = 1;this.decay = Math.random() * 0.01 + 0.01;this.trail = [];this.lifeTime = 0;}
}function init() {particlesArray = [];for (let i = 0; i < numberOfParticles; i++) {particlesArray.push(new Particle());}
}function animate() {ctx.clearRect(0, 0, canvas.width, canvas.height);for (let particle of particlesArray) {particle.update();particle.draw();}requestAnimationFrame(animate);
}window.addEventListener('resize', function() {canvas.width = window.innerWidth;canvas.height = window.innerHeight;init();
});window.addEventListener('mousemove', function(event) {mouse.x = event.x;mouse.y = event.y;
});window.addEventListener('mouseout', function() {mouse.x = undefined;mouse.y = undefined;
});window.addEventListener('click', function(event) {for (let i = 0; i < 30; i++) {const angle = Math.random() * 2 * Math.PI;const distance = Math.random() * 50;const x = event.x + Math.cos(angle) * distance;const y = event.y + Math.sin(angle) * distance;particlesArray.push(new Particle(x, y, 1));}
});init();
animate();
</script>
</html>

四:彩色拖尾特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>1234</title><style>body, html {margin: 0;padding: 0;width: 100%;height: 100%;overflow: hidden;background-color: #000;}#trail-container {position: absolute;top: 0;left: 0;width: 100%;height: 100%;pointer-events: none;}.particle {position: absolute;width: 3px; /* 减小粒子大小 */height: 3px;background-color: #fff;border-radius: 50%;opacity: 1;transform: translate(-50%, -50%);pointer-events: none;mix-blend-mode: screen;}/* 为粒子添加一个更快的淡出动画 */@keyframes fadeOut {0% { opacity: 1; }100% { opacity: 0; }}.particle.fade {animation: fadeOut 0.5s ease-out forwards; /* 缩短动画持续时间 */}</style>
</head>
<body><div id="trail-container"></div><script>document.addEventListener('DOMContentLoaded', () => {const trailContainer = document.getElementById('trail-container');const particles = [];// 监听鼠标移动事件document.addEventListener('mousemove', (e) => {// 在鼠标位置创建粒子createParticle(e.clientX, e.clientY);});// 创建粒子function createParticle(x, y) {const particle = document.createElement('div');particle.classList.add('particle');particle.style.left = `${x}px`;particle.style.top = `${y}px`;// 使用随机颜色或固定颜色particle.style.backgroundColor = getRandomColor();trailContainer.appendChild(particle);particles.push(particle);// 几乎立即给粒子添加淡出动画setTimeout(() => {particle.classList.add('fade');// 动画结束后移除粒子particle.addEventListener('animationend', () => {particle.remove();particles.splice(particles.indexOf(particle), 1);});}, 100); // 非常短的延迟,几乎立即开始淡出}// 获取随机颜色function getRandomColor() {const letters = '0123456789ABCDEF';let color = '#';for (let i = 0; i < 6; i++) {color += letters[Math.floor(Math.random() * 16)];}return color;}// 定期清理,动画结束后粒子会自动移除setInterval(() => {particles.forEach(particle => {if (particle.classList.contains('fade')) {particle.remove();particles.splice(particles.indexOf(particle), 1);}});}, 1000);});</script>
</body>
</html>

五:彩色粒子收回特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Enhanced Particle System with Gravity and Wind</title><style>body, html {margin: 0;padding: 0;width: 100%;height: 100%;overflow: hidden;}#particleCanvas {display: block;width: 100%;height: 100%;background: linear-gradient(to bottom, #000000, #111111);}</style>
</head>
<body><canvas id="particleCanvas"></canvas><script>const canvas = document.getElementById('particleCanvas');const ctx = canvas.getContext('2d');canvas.width = window.innerWidth;canvas.height = window.innerHeight;const particlesArray = [];const numberOfParticles = 500; const mouse = {x: undefined,y: undefined,};const gravity = 0.05; const wind = {x: 0.01, y: 0,};class Particle {constructor() {this.x = Math.random() * canvas.width;this.y = Math.random() * canvas.height;this.size = Math.random() * 5 + 1; this.speedX = (Math.random() - 0.5) * 4; this.speedY = (Math.random() - 0.5) * 4;this.color = 'hsl(' + Math.floor(Math.random() * 360) + ', 100%, 50%)';this.alpha = 1; this.targetX = this.x;this.targetY = this.y;this.ease = 0.05;}update() {if (mouse.x !== undefined && mouse.y !== undefined) {this.targetX = mouse.x;this.targetY = mouse.y;}this.x += (this.targetX - this.x) * this.ease;this.y += (this.targetY - this.y) * this.ease;this.speedY += gravity;this.speedX += wind.x;if (this.x > canvas.width || this.x < 0) this.speedX *= -1;if (this.y > canvas.height) this.y = canvas.height, this.speedY *= -0.7; this.alpha -= 0.01; if (this.alpha < 0) this.alpha = 0;this.draw();}draw() {ctx.globalAlpha = this.alpha;ctx.fillStyle = this.color;ctx.beginPath();ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);ctx.closePath();ctx.fill();}}function init() {for (let i = 0; i < numberOfParticles; i++) {particlesArray.push(new Particle());}}function animate() {ctx.clearRect(0, 0, canvas.width, canvas.height);for (let particle of particlesArray) {particle.update();}requestAnimationFrame(animate);}window.addEventListener('resize', function() {canvas.width = window.innerWidth;canvas.height = window.innerHeight;});window.addEventListener('mousemove', function(event) {mouse.x = event.x;mouse.y = event.y;});window.addEventListener('mouseout', function() {mouse.x = undefined;mouse.y = undefined;});window.addEventListener('click', function() {for (let i = 0; i < 20; i++) {particlesArray.push(new Particle());}});init();animate();</script>
</body>
</html>

六:彩色粒子交互特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>彩色粒子交互特效</title>
</head>
<body>
<script>!(function () {function n(n, e, t) {return n.getAttribute(e) || t;}function e(n) {return document.getElementsByTagName(n);}function t() {var t = e("script"),o = t.length,i = t[o - 1];return {l: o,z: n(i, "zIndex", -1),o: n(i, "opacity", 0.6),c: n(i, "color", "0,255,0"), n: n(i, "count", 400), // 粒子的数量};}function o() {(a = m.width =window.innerWidth ||document.documentElement.clientWidth ||document.body.clientWidth),(c = m.height =window.innerHeight ||document.documentElement.clientHeight ||document.body.clientHeight);}function i() {r.clearRect(0, 0, a, c);var n, e, t, o, m, l;s.forEach(function (particle, index) {for (particle.x += particle.xa,particle.y += particle.ya,particle.xa *= particle.x > a || particle.x < 0 ? -1 : 1,particle.ya *= particle.y > c || particle.y < 0 ? -1 : 1,// 使用粒子的颜色属性进行绘制r.fillStyle = particle.color,r.fillRect(particle.x - 0.5, particle.y - 0.5, 1, 1),e = index + 1;e < u.length;e++) {(n = u[e]),null !== n.x &&null !== n.y &&((o = particle.x - n.x),(m = particle.y - n.y),(l = o * o + m * m),l < n.max &&(n === y &&l >= n.max / 2 &&((particle.x -= 0.03 * o), (particle.y -= 0.03 * m)),(t = (n.max - l) / n.max),r.beginPath(),(r.lineWidth = t / 2),// 连线颜色和粒子颜色一致r.strokeStyle = particle.color,r.moveTo(particle.x, particle.y),r.lineTo(n.x, n.y),r.stroke()));}}),x(i);}var fixedColors = ["rgba(255, 0, 0, 1.0)",   // 红色"rgba(0, 255, 0, 1.0)",   // 绿色"rgba(0, 0, 255, 1.0)",   // 蓝色"rgba(255, 255, 0, 1.0)", // 黄色"rgba(0, 255, 255, 0.8)", // 青色"rgba(255, 0, 255, 0.8)", // 紫色"rgba(255, 165, 0, 0.8)", // 橙色"rgba(127, 255, 212, 1.0)","rgba(0, 255, 127, 1.0)"];var a,c,u,m = document.createElement("canvas"),d = t(),l = "c_n" + d.l,r = m.getContext("2d"),x =window.requestAnimationFrame ||window.webkitRequestAnimationFrame ||window.mozRequestAnimationFrame ||window.oRequestAnimationFrame ||window.msRequestAnimationFrame ||function (n) {window.setTimeout(n, 1e3 / 45);},w = Math.random,y = { x: null, y: null, max: 2e4 };(m.id = l),(m.style.cssText ="position:fixed;top:0;left:0;z-index:" + d.z + ";opacity:" + d.o),e("body")[0].appendChild(m),o(),(window.onresize = o),(window.onmousemove = function (n) {(n = n || window.event), (y.x = n.clientX), (y.y = n.clientY);}),(window.onmouseout = function () {(y.x = null), (y.y = null);});//固定颜色for (var s = [], f = 0; d.n > f; f++) {var h = w() * a,g = w() * c,v = 2 * w() - 1,p = 2 * w() - 1,// 从固定颜色数组中随机选择一个颜色color = fixedColors[Math.floor(Math.random() * fixedColors.length)];s.push({ x: h, y: g, xa: v, ya: p, max: 6e3, color: color }); // 使用选定的固定颜色}(u = s.concat([y])),setTimeout(function () {i();}, 100);})();</script>
</body>
</html>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/64902.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

深度学习之超分辨率算法——SRGAN

更新版本 实现了生成对抗网络在超分辨率上的使用 更新了损失函数&#xff0c;增加先验函数 SRresnet实现 import torch import torchvision from torch import nnclass ConvBlock(nn.Module):def __init__(self, kernel_size3, stride1, n_inchannels64):super(ConvBlock…

路由器做WPAD、VPN、透明代理中之间一个

本文章将采用家中TP-Link路由器 路由器进行配置DNS DNS理解知识本文DNS描述参考&#xff1a;网络安全基础知识&中间件简单介绍_计算机网络中间件-CSDN博客 TP LINK未知的错误&#xff0c;错误编号&#xff1a;-22025 TP-LINK 认证界面地址&#xff1a;https://realnam…

CentOS HTTPS自签证书访问失败问题的排查与解决全流程

sudo cp harbor.crt /usr/local/share/ca-certificates/sudo yum install -y ca-certificatessudo update-ca-trust force-enablesudo update-ca-trust extract 但是访问 https://172.16.20.20 仍然报错 * About to connect() to 172.16.20.20 port 443 (#0) * Trying 172.16.2…

Tool之Excalidraw:Excalidraw(开源的虚拟手绘风格白板)的简介、安装和使用方法、艾米莉应用之详细攻略

Tool之Excalidraw&#xff1a;Excalidraw(开源的虚拟手绘风格白板)的简介、安装和使用方法、艾米莉应用之详细攻略 目录 Excalidraw 简介 1、Excalidraw 的主要特点&#xff1a; Excalidraw 安装和使用方法 1、Excalidraw的安装 T1、使用 npm 安装&#xff1a; T2、使用 …

【蓝桥杯选拔赛真题96】Scratch风车旋转 第十五届蓝桥杯scratch图形化编程 少儿编程创意编程选拔赛真题解析

目录 scratch风车旋转 一、题目要求 编程实现 二、案例分析 1、角色分析 2、背景分析 3、前期准备 三、解题思路 1、思路分析 2、详细过程 四、程序编写 五、考点分析 六、推荐资料 1、入门基础 2、蓝桥杯比赛 3、考级资料 4、视频课程 5、python资料 scratc…

奇怪问题| Chrome 访问csdn 创作中心的时候报错: 服务超时,请稍后重试

Chrome 访问csdn 创作中心的时候报错&#xff1a; 服务超时,请稍后重试用无痕浏览器可以正常访问 关闭代理无效清缓存和Cookies无效。考虑无痕浏览器模式下插件不生效&#xff0c;尝试把chrome 插件也禁用&#xff0c;发现有效&#xff0c;是该扩展程序的缘故

sentinel学习笔记7-熔断降级

本文属于sentinel学习笔记系列。网上看到吴就业老师的专栏&#xff0c;写的好值得推荐&#xff0c;我整理的有所删减&#xff0c;推荐看原文。 https://blog.csdn.net/baidu_28523317/category_10400605.html 限流需要我们根据不同的硬件条件做好压测&#xff0c;不好准确评估…

记录--uniapp 安卓端实现录音功能,保存为amr/mp3文件

&#x1f9d1;‍&#x1f4bb; 写在开头 点赞 收藏 学会&#x1f923;&#x1f923;&#x1f923; 功能实现需要用到MediaRecorder、navigator.mediaDevices.getUserMedia、Blob等API&#xff0c;uniapp App端不支持&#xff0c;需要借助renderjs来实现 实现逻辑 通过naviga…

步进电机位置速度双环控制实现

步进电机位置速度双环控制实现 野火stm32电机教学 提高部分-第11讲 步进电机位置速度双环控制实现(1)_哔哩哔哩_bilibili PID模型 位置环作为外环,速度环作为内环。设定目标位置和实际转轴位置的位置偏差,经过位置PID获得位置期望,然后讲位置期望(位置变化反映了转轴的速…

MySQL 8.0:explain analyze 分析 SQL 执行过程

介绍 MySQL 8.0.16 引入一个实验特性&#xff1a;explain formattree &#xff0c;树状的输出执行过程&#xff0c;以及预估成本和预估返 回行数。在 MySQL 8.0.18 又引入了 EXPLAIN ANALYZE&#xff0c;在 formattree 基础上&#xff0c;使用时&#xff0c;会执行 SQL &#…

事务、管道

目录 事务 相关命令 悲观锁 乐观锁 管道 实例 Pipeline与原生批量命令对比 Pipeline与事物对比 使用Pipeline注意事项 事务 相关命令 命令描述discard取消事务&#xff0c;放弃执行事务块内的所有命令exec执行所有事务块内的事务&#xff08;所有命令依次执行&#x…

list的常用操作

list的介绍 list是序列容器&#xff0c;它允许在常数范围O&#xff08;1&#xff09;进行插入和删除在这段序列的任意位置&#xff0c;并且可以双向遍历 它是弥补vector容器的缺点&#xff0c;与vector有互补的韵味&#xff0c; 这里我们可以将其进行与vector进行对比 vect…

3.4 stm32系列:定时器(PWM、定时中断)

一、定时器概述 1.1 软件定时原理 使用纯软件&#xff08;CPU死等&#xff09;的方式实现定时&#xff08;延时&#xff09;功能&#xff1b; 不精准的延迟&#xff1a; /* 微秒级延迟函数* 不精准* stm32存在压出栈过程需要消耗时间* 存在流水线&#xff0c;执行时间不确定…

28、论文阅读:基于像素分布重映射和多先验Retinex变分模型的水下图像增强

A Pixel Distribution Remapping and Multi-Prior Retinex Variational Model for Underwater Image Enhancement 摘要介绍相关工作基于模型的水下图像增强方法&#xff1a;无模型水下图像增强方法&#xff1a;基于深度学习的水下图像增强方法&#xff1a; 论文方法概述像素分布…

【路径规划】原理及实现

路径规划&#xff08;Path Planning&#xff09;是指在给定地图、起始点和目标点的情况下&#xff0c;确定应该采取的最佳路径。常见的路径规划算法包括A* 算法、Dijkstra 算法、RRT&#xff08;Rapidly-exploring Random Tree&#xff09;等。 目录 一.A* 1.算法原理 2.实…

java web springboot

0. 引言 SpringBoot对Spring的改善和优化&#xff0c;它基于约定优于配置的思想&#xff0c;提供了大量的默认配置和实现 使用SpringBoot之后&#xff0c;程序员只需按照它规定的方式去进行程序代码的开发即可&#xff0c;而无需再去编写一堆复杂的配置 SpringBoot的主要功能…

实验四 综合数据流处理-Storm (单机和集群配置部分)

1.前期准备 &#xff08;1&#xff09;把docker和docker-compose给下载好 参考&#xff1a;基于docker-compose来搭建zookeeper集群-CSDN博客&#xff08;注意对于这篇文章下面配置zookeeper的内容&#xff0c;可以直接跳过&#xff0c;因为我们只需要看最上面下载docker-com…

前端开发 之 12个鼠标交互特效下【附完整源码】

前端开发 之 12个鼠标交互特效下【附完整源码】 文章目录 前端开发 之 12个鼠标交互特效下【附完整源码】七&#xff1a;粒子烟花绽放特效1.效果展示2.HTML完整代码 八&#xff1a;彩球释放特效1.效果展示2.HTML完整代码 九&#xff1a;雨滴掉落特效1.效果展示2.HTML完整代码 十…

Java设计模式 —— 【结构型模式】外观模式详解

文章目录 概述结构案例实现优缺点 概述 外观模式又名门面模式&#xff0c;是一种通过为多个复杂的子系统提供一个一致的接口&#xff0c;而使这些子系统更加容易被访问的模式。该模式对外有一个统一接口&#xff0c;外部应用程序不用关心内部子系统的具体的细节&#xff0c;这…

基于Springboot + vue实现的汽车资讯网站

&#x1f942;(❁◡❁)您的点赞&#x1f44d;➕评论&#x1f4dd;➕收藏⭐是作者创作的最大动力&#x1f91e; &#x1f496;&#x1f4d5;&#x1f389;&#x1f525; 支持我&#xff1a;点赞&#x1f44d;收藏⭐️留言&#x1f4dd;欢迎留言讨论 &#x1f525;&#x1f525;&…