摘要: function formatPrice(val: string | number, precision: number = 2) { if (typeof val 'string') { let num = parseFloat(val) if (isNaN(num) || num.toStrin 阅读全文
posted @ 2024-12-02 14:23 技术探索者 阅读(41) 评论(0) 推荐(0)
摘要: 第一步,写一个html页面 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>飞机大战</title> <style> body { margin: 0; } canvas { display: block; 阅读全文
posted @ 2024-11-26 17:17 技术探索者 阅读(224) 评论(0) 推荐(0)
摘要: 以下是JS方法获取100以内的质数 function getPrimes(max) { const primes = []; for (let num = 2; num <= max; num++) { let isPrime = true; for (let div = 2; div * div 阅读全文
posted @ 2024-07-26 10:35 技术探索者 阅读(35) 评论(0) 推荐(0)
摘要: 这里是介绍页 https://code.visualstudio.com/updates/v1_70 下载地址 https://update.code.visualstudio.com/1.70.2/win32-x64-user/stable 或者点击微软官网的页面 下载 从微软官网找了好久,找到了 阅读全文
posted @ 2024-07-25 22:47 技术探索者 阅读(3053) 评论(0) 推荐(0)
摘要: CSS 容器查询的主要思想是将一个元素注册为“容器”,并在容器元素满足某些条件时将样式应用于其他元素。 容器查询通常被认为是响应式网页设计的一种现代方法,其中传统媒体查询长期以来一直是黄金标准 - 原因是我们可以创建由响应容器宽度而不是视口宽度的元素组成的布局。 .parent { containe 阅读全文
posted @ 2024-07-23 21:03 技术探索者 阅读(205) 评论(0) 推荐(0)