李峋同款爱心(有源码2种)(下)

简介: 李峋同款爱心

第二种

 <!DOCTYPE html>
<!-- saved from url=(0051)https://httishere.gitee.io/notion/v4/love-name.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title> Love you </title>
    <style type="text/css">
      body {
        margin: 0;
        overflow: hidden;
        background: #000;
      }
      canvas {
        position: absolute;
        width: 100%;
        height: 100%;
      }
      #pinkboard {
        animation: anim 1.5s ease-in-out infinite;
        -webkit-animation: anim 1.5s ease-in-out infinite;
        -o-animation: anim 1.5s ease-in-out infinite;
        -moz-animation: anim 1.5s ease-in-out infinite;
      }
      @keyframes anim {
        0% {
          transform: scale(0.8);
        }
        25% {
          transform: scale(0.7);
        }
        50% {
          transform: scale(1);
        }
        75% {
          transform: scale(0.7);
        }
        100% {
          transform: scale(0.8);
        }
      }
      @-webkit-keyframes anim {
        0% {
          -webkit-transform: scale(0.8);
        }
        25% {
          -webkit-transform: scale(0.7);
        }
        50% {
          -webkit-transform: scale(1);
        }
        75% {
          -webkit-transform: scale(0.7);
        }
        100% {
          -webkit-transform: scale(0.8);
        }
      }
      @-o-keyframes anim {
        0% {
          -o-transform: scale(0.8);
        }
        25% {
          -o-transform: scale(0.7);
        }
        50% {
          -o-transform: scale(1);
        }
        75% {
          -o-transform: scale(0.7);
        }
        100% {
          -o-transform: scale(0.8);
        }
      }
      @-moz-keyframes anim {
        0% {
          -moz-transform: scale(0.8);
        }
        25% {
          -moz-transform: scale(0.7);
        }
        50% {
          -moz-transform: scale(1);
        }
        75% {
          -moz-transform: scale(0.7);
        }
        100% {
          -moz-transform: scale(0.8);
        }
      }
      #name {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin-top: -20px;
        font-size: 46px;
        color: #ea80b0;
      }
</style>
  <script src="./ Love you _files/monitors.3.6.36.cn.js.下载" async="" crossorigin="anonymous"></script><script src="./ Love you _files/sentry.3.6.36.cn.js.下载" async="" crossorigin="anonymous"></script></head>
  <body>
    <canvas id="pinkboard" width="1707" height="868"></canvas>
    <canvas id="canvas" width="1707" height="868"></canvas>
    <script type="text/javascript">
      const colors = [
        "#eec996",
        "#8fb7d3",
        "#b7d4c6",
        "#c3bedd",
        "#f1d5e4",
        "#cae1d3",
        "#f3c89d",
        "#d0b0c3",
        "#819d53",
        "#c99294",
        "#cec884",
        "#ff8e70",
        "#e0a111",
        "#fffdf6",
        "#cbd7ac",
        "#e8c6c0",
        "#dc9898",
        "#ecc8ba",
      ]; //用来设置的颜色
      var canvas = document.getElementById("canvas");
      var ctx = canvas.getContext("2d");
      let count = 1;
      var ww = window.innerWidth;
      var wh = window.innerHeight;
      var hearts = [];
      function init() {
        requestAnimationFrame(render);
        canvas.width = ww;
        canvas.height = wh;
        for (var i = 0; i < 100; i++) {
          hearts.push(new Heart());
        }
      }
      function Heart() {
        this.x = Math.random() * ww;
        this.y = Math.random() * wh;
        this.opacity = Math.random() * 0.5 + 0.5;
        this.vel = {
          x: (Math.random() - 0.5) * 4,
          y: (Math.random() - 0.5) * 4,
        };
        this.targetScale = Math.random() * 0.15 + 0.02;
        this.scale = this.targetScale * Math.random();
      }
      Heart.prototype.update = function (i) {
        this.x += this.vel.x;
        this.y += this.vel.y;
        this.scale += (this.targetScale - this.scale) * 0.01;
        if (this.x - this.width > ww || this.x + this.width < 0) {
          this.scale = 0;
          this.x = Math.random() * ww;
        }
        if (this.y - this.height > wh || this.y + this.height < 0) {
          this.scale = 0;
          this.y = Math.random() * wh;
        }
        this.width = 473.8;
        this.height = 408.6;
      };
      Heart.prototype.draw = function (i) {
        ctx.globalAlpha = this.opacity;
        ctx.font = `${180 * this.scale}px "微软雅黑"`;
        // ctx.font="20px";
        ctx.fillStyle = colors[i % 18];
        ctx.fillText(
          "kawsar",
          this.x - this.width * 0.5,
          this.y - this.height * 0.5,
          this.width,
          this.height
        );
        // ctx.drawImage(
        // heartImage,
        // this.x - this.width * 0.5,
        // this.y - this.height * 0.5,
        // this.width,
        // this.heig
目录
相关文章
|
4月前
|
人工智能 监控 安全
智慧工地主要包括哪些内容?
智慧工地运用物联网、AI、大数据等技术,实现施工全过程的数字化与智能化管理。涵盖人员、设备、安全、环境、质量与信息化六大板块,通过智能设备与系统协同,提升效率、保障安全、降低成本,助力绿色施工与科学决策。
776 5
|
5月前
|
SQL JavaScript 前端开发
从混乱到聚焦:任务优先级排序工具在敏捷管理中的核心作用解析
在快节奏的工作中,任务多却难出成绩?问题往往不在“做得少”,而在“乱做”。本文详解任务优先级排序工具的原理与实战,帮助团队统一评估标准、聚焦关键目标,避免被紧急事务干扰真正重要的工作。通过实用工具与代码示例,助你建立科学的任务排序机制,提升效率与产出。
|
2月前
|
人工智能 安全 网络安全
如何禁止电脑安装某个应用?4招封印“流氓软件”!手把手教你给电脑装上“防护罩”
企业常因员工私装软件导致数据泄露、系统崩溃等问题。本文分享四大防护方案:洞察眼MIT系统、组策略编辑、UAC权限控制及软件白名单制度,从源头杜绝非法软件安装,筑牢办公网络安全防线。
|
2月前
|
机器学习/深度学习 缓存 自然语言处理
30_情感分析变体详解:从极性到细粒度 - 深度解析与教学
情感分析(Sentiment Analysis),又称意见挖掘(Opinion Mining),是自然语言处理(NLP)领域的核心任务之一,旨在自动识别和提取文本中的情感信息。随着社交媒体的普及和用户生成内容的爆炸式增长,情感分析技术在商业决策、舆情监测、产品开发等领域发挥着越来越重要的作用。
|
2月前
|
存储 API 数据库
按图搜索1688商品的API接口
本文介绍如何利用阿里云ImageSearch服务实现1688商品的按图搜索功能。通过提取图像特征向量并计算相似度,结合Flask搭建API接口,可快速构建基于图片的商品检索系统,提升电商用户体验。
255 0
|
3月前
|
传感器 人工智能 安全
物联网
万物互联,智启未来。物联网通过连接人、物、环境,重塑生活、城市与产业。从智能家居到智慧城市,从工业互联网到精准农业,数据驱动智能化变革。融合AI、5G等技术,构建高效、安全、可持续的智能世界,开启人类社会新篇章。(238字)
|
8月前
|
机器学习/深度学习 人工智能 自然语言处理
ai人工智能课程学什么
本内容全面介绍了AI课程的核心体系,涵盖基础理论、核心算法、应用领域及伦理责任等方面。从数学基础与编程技能到机器学习和深度学习算法,再到自然语言处理与计算机视觉等应用领域,系统阐述了AI技术的全貌。同时探讨了开发框架如TensorFlow和PyTorch的使用,并关注AI伦理与社会责任。通过分步验证与实践经验,帮助学习者规避AI局限性。展望未来,生成式人工智能等新兴技术将持续推动课程发展,助力职业成长与社会进步。
|
11月前
|
编解码 前端开发 算法
实时云渲染方案为虚拟仿真教学搭建共享平台
实时云渲染技术的应用也日益重要,平行云作为唯一提供云渲染技术服务的企业,参与制定《虚拟仿真实验教学课程建设与共享应用规范(试用版·2020)》,有效解决下载、算力和盗版等痛点,实现随时随地的在线访问,保护知识产权,降低终端硬件要求,兼容性强,助力学校构建统一入口云平台。
|
12月前
|
机器学习/深度学习 计算机视觉
深度学习在图像识别中的应用与挑战
本文深入探讨了深度学习技术在图像识别领域的应用及其面临的挑战。通过分析深度学习模型如卷积神经网络(CNN)的工作原理,我们揭示了这些模型如何有效地处理和识别图像数据。同时,文章也指出了当前深度学习在图像识别中遇到的一些主要问题,包括过拟合、数据集偏差和模型解释性等,为读者提供了对这一领域全面而深入的理解。