前端开发 之 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 lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟花绽放特效</title>
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body, html {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #161816;
    overflow: hidden;
  }

  #explosion-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
  }

  .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 1;
    pointer-events: none;
  }
</style>
</head>
<body>

<div id="explosion-container"></div>

<script>
  const container = document.getElementById('explosion-container');
  const particleCount = 100;
  const maxSpeed = 5;
  const colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff'];

  function random(min, max) {
    return Math.random() * (max - min) + min;
  }

  function getRandomColor() {
    const randomIndex = Math.floor(Math.random() * colors.length);
    return colors[randomIndex];
  }

  function createParticle(startX, startY) {
    const particle = document.createElement('div');
    particle.classList.add('particle');
    const halfSize = random(2, 6) / 2;
    particle.style.width = `${2 * halfSize}px`;
    particle.style.height = `${2 * halfSize}px`;
    particle.style.backgroundColor = getRandomColor();

    const speedX = random(-maxSpeed, maxSpeed);
    const speedY = random(-maxSpeed, maxSpeed);
    let x = startX;
    let y = startY;
    let angle = random(0, 2 * Math.PI);

    function update() {
      x += speedX;
      y += speedY;
      angle += 0.1;
      particle.style.transform = `translate3d(${x}px, ${y}px, 0) rotate(${angle}rad)`;

      if (x < -50 || x > window.innerWidth + 50 || y < -50 || y > window.innerHeight + 50) {
        particle.remove();
      } else {
        requestAnimationFrame(update);
      }
    }

    update();
    container.appendChild(particle);
  }

  function createExplosion(x, y) {
    for (let i = 0; i < particleCount; i++) {
      createParticle(x, y);
    }
  }

  document.addEventListener('click', (event) => {
    createExplosion(event.clientX, event.clientY);
  });
</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>
    <style>
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#particleCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}
    </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;

const particlesArray = [];
const numberOfParticles = 100;
const mouse = {
    x: undefined,
    y: undefined,
};

class Particle {
    constructor() {
        this.x = canvas.width / 2;
        this.y = canvas.height / 2;
        this.size = Math.random() * 5 + 1;
        this.speedX = Math.random() * 3 - 1.5;
        this.speedY = Math.random() * 3 - 1.5;
        this.color = 'hsl(' + Math.floor(Math.random() * 360) + ', 100%, 50%)';
    }

    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;

        this.draw();
    }

    draw() {
        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;
    for (let particle of particlesArray) {
        particle.x = mouse.x;
        particle.y = mouse.y;
    }
});

window.addEventListener('mouseout', function() {
    mouse.x = undefined;
    mouse.y = undefined;
});

init();
animate();
</script>
</html>

九:雨滴掉落特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE html>
<html>
<head>
  <title>雨滴掉落特效</title>
  <meta name="Generator" content="EditPlus">
  <meta charset="UTF-8">
  <style>
    body, html {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;
    }

    canvas {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    }
  </style>
</head>

<body>
  <canvas id="canvas-club"></canvas>
  <div class="overlay"></div>

  <script>
    var c = document.getElementById("canvas-club");
    var ctx = c.getContext("2d");
    var w = c.width = window.innerWidth;
    var h = c.height = window.innerHeight;
    var clearColor = 'rgba(0, 0, 0, .1)';
    var max = 30;
    var drops = [];
    var mouseX = 0;
    var mouseY = 0;

    function random(min, max) {
      return Math.random() * (max - min) + min;
    }

    function O() {}
    O.prototype = {
      init: function(x, y) {
        this.x = x;
        this.y = y;
        this.color = 'hsl(180, 100%, 50%)';
        this.w = 2;
        this.h = 1;
        this.vy = random(4, 5);
        this.vw = 3;
        this.vh = 1;
        this.size = 2;
        this.hit = random(h * .8, h * .9);
        this.a = 1;
        this.va = 0.96;
      },
      draw: function() {
        if (this.y > this.hit) {
          ctx.beginPath();
          ctx.moveTo(this.x, this.y - this.h / 2);

          ctx.bezierCurveTo(
            this.x + this.w / 2, this.y - this.h / 2,
            this.x + this.w / 2, this.y + this.h / 2,
            this.x, this.y + this.h / 2);

          ctx.bezierCurveTo(
            this.x - this.w / 2, this.y + this.h / 2,
            this.x - this.w / 2, this.y - this.h / 2,
            this.x, this.y - this.h / 2);

          ctx.strokeStyle = 'hsla(180, 100%, 50%, ' + this.a + ')';
          ctx.stroke();
          ctx.closePath();

        } else {
          ctx.fillStyle = this.color;
          ctx.fillRect(this.x, this.y, this.size, this.size * 5);
        }
        this.update();
      },
      update: function() {
        if (this.y < this.hit) {
          this.y += this.vy;
        } else {
          if (this.a > 0.03) {
            this.w += this.vw;
            this.h += this.vh;
            if (this.w > 100) {
              this.a *= this.va;
              this.vw *= 0.98;
              this.vh *= 0.98;
            }
          } else {
            this.a = 0; 
          }
        }
      }
    }

    function resize() {
      w = c.width = window.innerWidth;
      h = c.height = window.innerHeight;
    }

    function anim() {
      ctx.fillStyle = clearColor;
      ctx.fillRect(0, 0, w, h);
      for (var i = drops.length - 1; i >= 0; i--) {
        drops[i].draw();
        if (drops[i].a <= 0.03) {
          drops.splice(i, 1); 
        }
      }
      requestAnimationFrame(anim);
    }

    function onMouseMove(e) {
      mouseX = e.clientX;
      mouseY = e.clientY;
      createRainDrop(mouseX, mouseY);
    }

    function createRainDrop(x, y) {
      for (var i = 0; i < drops.length; i++) {
        if (drops[i].y === 0) {
          drops[i].init(x, y);
          return;
        }
      }
      var o = new O();
      o.init(x, y);
      drops.push(o);
      if (drops.length > max) {
        drops.shift();
      }
    }

    window.addEventListener("resize", resize);
    window.addEventListener("mousemove", onMouseMove);

    anim();
  </script>
</body>
</html>

十:一叶莲滑动特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE HTML>
<html>
<head>
<title>一叶莲滑动特效</title>
<meta charset="UTF-8">
<style>
    html, body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        cursor: none; 
    }

    .container {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        background-image: linear-gradient(to right, rgba(154, 89, 168, 0.67), rgba(255, 30, 0, 0.67), rgba(0, 255, 153, 0.67));
    }

    .cursor {
        position: absolute;
        width: 20px;
        height: 20px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        transition: transform 0.1s, opacity 0.1s;
    }
</style>
<script src="jquery-3.7.1.min.js"></script>
</head>
<body>
    <div id="jsi-cherry-container" class="container"></div>
    <div id="cursor" class="cursor"></div>
    <script>
        var RENDERER = {
            cherries: [],
            mouse: { x: 0, y: 0 },

            init: function () {
                this.setParameters();
                this.bindEvents();
                this.animate();
            },
            setParameters: function () {
                this.$container = $('#jsi-cherry-container');
                this.width = this.$container.width();
                this.height = this.$container.height();
                this.context = $('<canvas />').attr({ width: this.width, height: this.height }).appendTo(this.$container).get(0).getContext('2d');
                this.$cursor = $('#cursor');
            },
            bindEvents: function () {
                $(document).on('mousemove', (e) => {
                    this.mouse.x = e.pageX;
                    this.mouse.y = e.pageY;
                });

                $(document).on('mouseout', () => {
                    this.mouse.x = -100;
                    this.mouse.y = -100;
                });

                window.addEventListener('resize', () => {
                    this.width = this.$container.width();
                    this.height = this.$container.height();
                    this.context.canvas.width = this.width;
                    this.context.canvas.height = this.height;
                });
            },
            createCherry: function (x, y) {
                var cherry = new CHERRY_BLOSSOM(this, x, y);
                this.cherries.push(cherry);
            },
            animate: function () {
                requestAnimationFrame(this.animate.bind(this));
                this.context.clearRect(0, 0, this.width, this.height);

                this.cherries.forEach((cherry, index) => {
                    cherry.update();
                    cherry.render(this.context);

                    if (cherry.opacity <= 0) {
                        this.cherries.splice(index, 1);
                    }
                });

                this.$cursor.css({
                    left: this.mouse.x,
                    top: this.mouse.y,
                    opacity: this.cherries.length > 0 ? 0 : 1 
                });
            }
        };

        var CHERRY_BLOSSOM = function (renderer, x, y) {
            this.renderer = renderer;
            this.x = x;
            this.y = y;
            this.size = Math.random() * 10 + 10;
            this.angle = Math.random() * Math.PI * 2;
            this.speed = Math.random() * 0.5 + 0.5;
            this.opacity = 1;
            this.life = 100 + Math.random() * 100;
        };

        CHERRY_BLOSSOM.prototype = {
            update: function () {
                this.x += Math.cos(this.angle) * this.speed;
                this.y += Math.sin(this.angle) * this.speed;
                this.opacity -= 0.02;
                this.size *= 0.98;
                this.life--;
            },
            render: function (context) {
                context.save();
                context.globalAlpha = this.opacity;
                context.fillStyle = 'hsl(330, 70%, 50%)';
                context.translate(this.x, this.y);
                context.scale(this.size / 20, this.size / 20);
                context.beginPath();
                context.moveTo(0, 40);
                context.bezierCurveTo(-60, 20, -10, -60, 0, -20);
                context.bezierCurveTo(10, -60, 60, 20, 0, 40);
                context.fill();
                context.restore();
            }
        };

        $(function () {
            RENDERER.init();
            setInterval(() => {
                RENDERER.createCherry(RENDERER.mouse.x, RENDERER.mouse.y);
            }, 50);
        });
    </script>
</body>
</html>

十一:彩球背景滑动交互特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE HTML>
<html>
<head>
<title>彩球背景滑动交互特效</title>
<meta charset="UTF-8">
<style>
    html, body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        cursor: none;
    }
    .container {
        width: 100%;
        height: 100%;
        background-image: linear-gradient(to right, rgba(154, 89, 168, 0.67), rgba(255, 30, 0, 0.67), rgba(0, 255, 153, 0.67));
    }
    .cursor {
        position: absolute;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.7);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
        pointer-events: none;
        z-index: 1000;
    }
</style>
<script type="text/javascript" src="jquery-3.7.1.min.js"></script>
</head>
<body>
<div id="jsi-cherry-container" class="container"></div>
<div id="cursor" class="cursor"></div>
<script>
    var RENDERER = {
        INIT_CHERRY_BLOSSOM_COUNT: 50,
        MAX_ADDING_INTERVAL: 10,
        cherries: [],
        mouse: { x: 0, y: 0 },

        init: function () {
            this.setParameters();
            this.reconstructMethods();
            this.createCherries();
            this.bindEvents();
            this.render();
        },
        setParameters: function () {
            this.$container = $('#jsi-cherry-container');
            this.width = this.$container.width();
            this.height = this.$container.height();
            this.context = $('<canvas />').attr({ width: this.width, height: this.height }).appendTo(this.$container).get(0).getContext('2d');
            this.maxAddingInterval = Math.round(this.MAX_ADDING_INTERVAL * 1000 / this.width);
            this.addingInterval = this.maxAddingInterval;
        },
        reconstructMethods: function () {
            this.render = this.render.bind(this);
            this.onMouseMove = this.onMouseMove.bind(this);
        },
        bindEvents: function () {
            $(window).on('mousemove', this.onMouseMove);
        },
        createCherries: function () {
            for (var i = 0, length = Math.round(this.INIT_CHERRY_BLOSSOM_COUNT * this.width / 1000); i < length; i++) {
                this.cherries.push(new CHERRY_BLOSSOM(this));
            }
        },
        onMouseMove: function (e) {
            this.mouse.x = e.pageX;
            this.mouse.y = e.pageY;
        },
        render: function () {
            requestAnimationFrame(this.render);
            this.context.clearRect(0, 0, this.width, this.height);

            $('#cursor').css({ left: this.mouse.x - 10 + 'px', top: this.mouse.y - 10 + 'px' });

            this.cherries.sort(function (cherry1, cherry2) {
                return cherry1.z - cherry2.z;
            });
            for (var i = this.cherries.length - 1; i >= 0; i--) {
                if (!this.cherries[i].render(this.context, this.mouse)) {
                    this.cherries.splice(i, 1);
                }
            }
            if (--this.addingInterval == 0) {
                this.addingInterval = this.maxAddingInterval;
                this.cherries.push(new CHERRY_BLOSSOM(this));
            }
        }
    };

    var CHERRY_BLOSSOM = function (renderer) {
        this.renderer = renderer;
        this.init();
    };
    CHERRY_BLOSSOM.prototype = {
        FOCUS_POSITION: 300,
        FAR_LIMIT: 600,
        init: function () {
            this.x = this.getRandomValue(-this.renderer.width, this.renderer.width);
            this.y = this.getRandomValue(0, this.renderer.height);
            this.z = this.getRandomValue(0, this.FAR_LIMIT);
            this.vx = this.getRandomValue(-1, 1);
            this.vy = this.getRandomValue(-1, 1);
            this.theta = this.getRandomValue(0, Math.PI * 2);
            this.phi = this.getRandomValue(0, Math.PI * 2);
            this.size = this.getRandomValue(2, 5);
            this.color = 'hsl(' + Math.floor(Math.random() * 360) + ', 100%, 50%)';
        },
        getRandomValue: function (min, max) {
            return min + (max - min) * Math.random();
        },
        getAxis: function (mouse) {
            var rate = this.FOCUS_POSITION / (this.z + this.FOCUS_POSITION),
                x = this.renderer.width / 2 + (this.x - mouse.x) * rate,
                y = this.renderer.height / 2 - (this.y - mouse.y) * rate;
            return { rate: rate, x: x, y: y };
        },
        render: function (context, mouse) {
            var axis = this.getAxis(mouse);

            context.save();
            context.fillStyle = this.color;
            context.translate(axis.x, axis.y);
            context.rotate(this.theta);
            context.scale(axis.rate * this.size, axis.rate * this.size);
            context.beginPath();
            context.moveTo(0, 0);
            context.arc(0, 0, 10, 0, Math.PI * 2, false);
            context.fill();
            context.restore();

            this.x += this.vx;
            this.y += this.vy;
            this.theta += 0.01;

            return this.z > -this.FOCUS_POSITION && this.z < this.FAR_LIMIT && this.x < this.renderer.width * 1.5 && this.x > -this.renderer.width * 0.5;
        }
    };

    $(function () {
        RENDERER.init();
    });
</script>
</body>
</html>

十二:雨滴散落交互特效

1.效果展示

在这里插入图片描述

2.HTML完整代码
<!DOCTYPE html>
<html>
<head>
  <title>雨滴散落特效</title>
  <meta name="Generator" content="EditPlus">
  <meta charset="UTF-8">
  <style>
    body, html {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;
    }

    canvas {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    }

  </style>
</head>

<body>
  <canvas id="canvas-club"></canvas>
  <div class="overlay"></div>

  <script>
    var c = document.getElementById("canvas-club");
    var ctx = c.getContext("2d");
    var w = c.width = window.innerWidth;
    var h = c.height = window.innerHeight;
    var clearColor = 'rgba(0, 0, 0, .1)';
    var max = 30;
    var drops = [];
    var mouseX = 0;
    var mouseY = 0;

    function random(min, max) {
      return Math.random() * (max - min) + min;
    }

    function O() {}
    O.prototype = {
      init: function(x, y) {
        this.x = x;
        this.y = y;
        this.color = 'hsl(180, 100%, 50%)';
        this.w = 2;
        this.h = 1;
        this.vy = random(4, 5);
        this.vw = 3;
        this.vh = 1;
        this.size = 2;
        this.hit = random(h * .8, h * .9);
        this.a = 1;
        this.va = .96;
      },
      draw: function() {
        if (this.y > this.hit) {
          ctx.beginPath();
          ctx.moveTo(this.x, this.y - this.h / 2);

          ctx.bezierCurveTo(
            this.x + this.w / 2, this.y - this.h / 2,
            this.x + this.w / 2, this.y + this.h / 2,
            this.x, this.y + this.h / 2);

          ctx.bezierCurveTo(
            this.x - this.w / 2, this.y + this.h / 2,
            this.x - this.w / 2, this.y - this.h / 2,
            this.x, this.y - this.h / 2);

          ctx.strokeStyle = 'hsla(180, 100%, 50%, ' + this.a + ')';
          ctx.stroke();
          ctx.closePath();

        } else {
          ctx.fillStyle = this.color;
          ctx.fillRect(this.x, this.y, this.size, this.size * 5);
        }
        this.update();
      },
      update: function() {
        if (this.y < this.hit) {
          this.y += this.vy;
        } else {
          if (this.a > .03) {
            this.w += this.vw;
            this.h += this.vh;
            if (this.w > 100) {
              this.a *= this.va;
              this.vw *= .98;
              this.vh *= .98;
            }
          } else {
            this.init(random(0, w), 0); 
          }
        }
      }
    }

    function resize() {
      w = c.width = window.innerWidth;
      h = c.height = window.innerHeight;
    }

    function anim() {
      ctx.fillStyle = clearColor;
      ctx.fillRect(0, 0, w, h);
      for (var i in drops) {
        drops[i].draw();
      }
      requestAnimationFrame(anim);
    }

    function onMouseMove(e) {
      mouseX = e.clientX;
      mouseY = e.clientY;
      createRainDrop(mouseX, mouseY);
    }

    function createRainDrop(x, y) {
      for (var i = 0; i < drops.length; i++) {
        if (drops[i].y === 0) {
          drops[i].init(x, y);
          return;
        }
      }
      var o = new O();
      o.init(x, y);
      drops.push(o);
      if (drops.length > max) {
        drops.shift();
      }
    }

    window.addEventListener("resize", resize);
    window.addEventListener("mousemove", onMouseMove);
    anim();
  </script>
</body>
</html>

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

重生之我在异世界学编程之C语言:深入预处理篇(上)

大家好&#xff0c;这里是小编的博客频道 小编的博客&#xff1a;就爱学编程 很高兴在CSDN这个大家庭与大家相识&#xff0c;希望能在这里与大家共同进步&#xff0c;共同收获更好的自己&#xff01;&#xff01;&#xff01; 本文目录 引言正文一、预处理的作用与流程&#xf…

Android使用PorterDuffXfermode模式PorterDuff.Mode.SRC_OUT橡皮擦实现“刮刮乐”效果,Kotlin(2)

Android使用PorterDuffXfermode模式PorterDuff.Mode.SRC_OUT橡皮擦实现“刮刮乐”效果&#xff0c;Kotlin&#xff08;2&#xff09; 在 Android使用PorterDuffXfermode的模式PorterDuff.Mode.SRC_OUT实现橡皮擦&#xff0c;Kotlin&#xff08;1&#xff09;-CSDN博客文章浏览阅…

修改 `invite_codes` 表中 `code` 字段名为 `invite_code`

-- auto-generated definition create table invite_codes (id int auto_incrementprimary key,code varchar(6) not null comment 邀请码&#xff0c;6位整数&#xff0c;确保在有效期内…

Python + 深度学习从 0 到 1(01 / 99)

希望对你有帮助呀&#xff01;&#xff01;&#x1f49c;&#x1f49c; 如有更好理解的思路&#xff0c;欢迎大家留言补充 ~ 一起加油叭 &#x1f4a6; 欢迎关注、订阅专栏 【深度学习从 0 到 1】谢谢你的支持&#xff01; ⭐ 深度学习之前&#xff1a;机器学习简史 什么要了解…

路径规划之启发式算法之二十三:免疫算法(Immune Algorithm,IA)

免疫算法(Immune Algorithm,IA)是基于人工免疫系统的理论,受生物免疫系统的启发而推出的一种新型的智能搜索算法。通过模拟生物免疫系统的工作原理来解决优化问题。 一、定义与原理 免疫算法是以人工免疫系统的理论为基础,实现了类似于生物免疫系统的抗原识别、细胞分化、…

echarts画风向杆

1.安装echarts 2.引入echarts 4.获取数据&#xff0c;转换数据格式 windProfile.title.text ${moment(time.searchTime[0], ‘YYYY-MM-DD HH:mm:ss’).format( ‘YYYY-MM-DD HH:mm’ )}-${moment(time.searchTime[1], ‘YYYY-MM-DD HH:mm:ss’).format(‘YYYY-MM-DD HH:mm’)…

【落羽的落羽 C语言篇】自定义类型——结构体

文章目录 一、结构体1. 结构体类型的概念和声明2. 结构体变量的创建和初始化3. 结构体成员的访问3.1 直接访问3.2 间接访问 4. 结构体的内存对齐4.1 内存对齐的规则4.2 内存对齐的原因4.3 修改默认对齐数 5. 结构体传参6. 结构体实现位段 在C语言中&#xff0c;已经提供了一些基…

CSS盒子模型(溢出隐藏,块级元素和行级元素的居中对齐,元素样式重置)

overflow&#xff1a;值 规定了内容溢出元素框时所发生的事情 visible&#xff1a;内容不会被修剪&#xff0c;会显示在元素框之外&#xff0c;默认值 overflow: visible; hidden&#xff1a;内容会被修剪&#xff0c;溢出内容不可见 overflow: hidden; scroll&#xff1a;内…

Spark-Streaming集成Kafka

Spark Streaming集成Kafka是生产上最多的方式&#xff0c;其中集成Kafka 0.10是较为简单的&#xff0c;即&#xff1a;Kafka分区和Spark分区之间是1:1的对应关系&#xff0c;以及对偏移量和元数据的访问。与高版本的Kafka Consumer API 集成时做了一些调整&#xff0c;下面我们…

【Python】pandas库---数据分析

大学毕业那年&#xff0c;你成了社会底层群众里&#xff0c;受教育程度最高的一批人。 前言 这是我自己学习Python的第四篇博客总结。后期我会继续把Python学习笔记开源至博客上。 上一期笔记有关Python的NumPy数据分析&#xff0c;没看过的同学可以去看看&#xff1a;【Pyt…

数字IC后端设计实现篇之TSMC 12nm TCD cell(Dummy TCD Cell)应该怎么加?

TSMC 12nm A72项目我们需要按照foundary的要求提前在floorplan阶段加好TCD Cell。这个cell是用来做工艺校准的。这个dummy TCD Cell也可以等后续Calibre 插dummy自动插。但咱们项目要求提前在floorplan阶段就先预先规划好位置。 TSCM12nm 1P9M的metal stack结构图如下图所示。…

LiteFlow决策系统的策略模式,顺序、最坏、投票、权重

个人博客&#xff1a;无奈何杨&#xff08;wnhyang&#xff09; 个人语雀&#xff1a;wnhyang 共享语雀&#xff1a;在线知识共享 Github&#xff1a;wnhyang - Overview 想必大家都有听过或做过职业和性格测试吧&#xff0c;尤其是现在的毕业生&#xff0c;在投了简历之后经…

YashanDB 23.2 YAC -单库多实例架构多活共享集群安装部署指南

一、概述 1.1 文档目标 ​ 本说明旨在指导技术人员在 CentOS 7 x86_64 操作系统上完成崖山数据库企业版 23.2 的共享集群安装与部署。通过系统架构、集群拓扑及部署需求的精确描述&#xff0c;帮助读者在开始安装前对崖山数据库的架构形成清晰认识。本文以高效、稳定、安全为…

某科技局国产服务器PVE虚拟化技术文档

环境介绍 硬件配置 服务器品牌&#xff1a;黄河 型号&#xff1a;Huanghe 2280 V2 Cpu型号&#xff1a;kunpeng-920 磁盘信息 :480SSD * 2 ,4T*4 网卡&#xff1a;板载四口千兆 如下表 四台服务器同等型号配置&#xff0c;均做单节点虚拟化&#xff0c;数据保护采用底层r…

Gin-vue-admin(4):项目创建前端一级页面和二级页面

目录 创建一级页面创建二级页面 创建一级页面 view目录下新建一个my&#xff0c;Index.vue <template></template><script> export default {name:My, } </script><script setup> import {ref} from vue const myNameref("name") &…

Ubuntu下的tcl/tk编程快速入门

一、Tcl/Tk 简介 接口介绍 https://www.tutorialspoint.com/tcl-tk/tcl_tk_quick_guide.htm GUI Canvas接口 https://www.tutorialspoint.com/tcl-tk/tk_canvas_widgets.htm tcl语言 https://www.tcl-lang.org/ 官方教程 https://www.tcl.tk/man/tcl8.5/tutorial/tcltutoria…

数字化审计咨询服务,企业转型数字化审计的必要条件

人工智能、云计算、大数据、物联网等新兴技术的快速发展&#xff0c;为企业的数字化转型提供了强大的技术支持。这些技术逐渐被应用到企业运营管理的方方面面&#xff0c;推动了企业内部审计工作的变革。随着数字化转型的深化和信息技术的不断发展&#xff0c;数字化审计将成为…

【QT常用技术讲解】发送POST包(两种方式:阻塞方式及非阻塞方式)

前言 http/https(应用层)协议是广泛使用的网络通信协议。在很多与第三方API对接的场景中&#xff0c;通常是通过http/https协议完成&#xff0c;比如API对接时&#xff0c;通常要通过POST包获取access_token进行鉴权&#xff0c;然后再进行数据交互&#xff08;本篇也包含有对接…

重撸设计模式--代理模式

文章目录 定义UML图代理模式主要有以下几种常见类型&#xff1a;代理模式涉及的主要角色有&#xff1a;C 代码示例 定义 代理模式&#xff08;Proxy Pattern&#xff09;属于结构型设计模式&#xff0c;它为其他对象提供一种代理以控制对这个对象的访问。 通过引入代理对象&am…

【Steel Code】 10.5 COMPOSITE COLUMNS

10.5 COMPOSITE COLUMNS 组合柱 10.5.1 General 总则 (1) This clause applies for the design of composite columns and composite compression members with fully encased H sections, partially encased H sections, and infilled rectangular and circular hollow sect…