当前位置: 首页 > news >正文

JavaScript系列(58)--性能监控系统详解

JavaScript性能监控系统详解 📊

今天,让我们深入探讨JavaScript的性能监控系统。性能监控对于保证应用的稳定性和用户体验至关重要。

性能监控基础概念 🌟

💡 小知识:JavaScript性能监控是指通过收集和分析各种性能指标,来评估和优化应用性能的过程。这包括页面加载时间、资源使用情况、运行时性能等多个方面。

性能指标收集 📈

// 1. 性能指标收集器
class PerformanceCollector {constructor() {this.metrics = new Map();this.observers = new Set();}// 收集页面加载性能collectPageMetrics() {const timing = performance.timing;const metrics = {dnsTime: timing.domainLookupEnd - timing.domainLookupStart,tcpTime: timing.connectEnd - timing.connectStart,ttfb: timing.responseStart - timing.requestStart,domReady: timing.domContentLoadedEventEnd - timing.navigationStart,loadComplete: timing.loadEventEnd - timing.navigationStart};this.metrics.set('page', metrics);this.notifyObservers('page', metrics);}// 收集资源加载性能collectResourceMetrics() {const resources = performance.getEntriesByType('resource');const metrics = resources.map(resource => ({name: resource.name,type: resource.initiatorType,duration: resource.duration,size: resource.transferSize,startTime: resource.startTime}));this.metrics.set('resources', metrics);this.notifyObservers('resources', metrics);}// 收集运行时性能collectRuntimeMetrics() {const metrics = {memory: performance.memory ? {usedJSHeapSize: performance.memory.usedJSHeapSize,totalJSHeapSize: performance.memory.totalJSHeapSize,jsHeapSizeLimit: performance.memory.jsHeapSizeLimit} : null,fps: this.calculateFPS()};this.metrics.set('runtime', metrics);this.notifyObservers('runtime', metrics);}calculateFPS() {let lastTime = performance.now();let frames = 0;let fps = 0;const updateFPS = () => {const now = performance.now();frames++;if (now > lastTime + 1000) {fps = Math.round((frames * 1000) / (now - lastTime));frames = 0;lastTime = now;}requestAnimationFrame(updateFPS);};requestAnimationFrame(updateFPS);return () => fps;}addObserver(observer) {this.observers.add(observer);}removeObserver(observer) {this.observers.delete(observer);}notifyObservers(type, data) {this.observers.forEach(observer => {observer.update(type, data);});}
}// 2. 性能标记管理器
class PerformanceMarker {constructor() {this.marks = new Map();}mark(name) {performance.mark(name);this.marks.set(name, performance.now());}measure(name, startMark, endMark) {performance.measure(name, startMark, endMark);const measure = performance.getEntriesByName(name, 'measure')[0];return {name,duration: measure.duration,startTime: measure.startTime};}clearMarks() {performance.clearMarks();this.marks.clear();}clearMeasures() {performance.clearMeasures();}
}// 3. 用户交互监控
class InteractionMonitor {constructor() {this.interactions = [];this.setupListeners();}setupListeners() {const observer = new PerformanceObserver(list => {const entries = list.getEntries();this.processInteractions(entries);});observer.observe({ entryTypes: ['first-input', 'layout-shift', 'largest-contentful-paint']});}processInteractions(entries) {entries.forEach(entry => {this.interactions.push({type: entry.entryType,startTime: entry.startTime,duration: entry.duration,value: entry.value,element: entry.target});});}getInteractionMetrics() {return {fid: this.calculateFID(),cls: this.calculateCLS(),lcp: this.calculateLCP()};}calculateFID() {const fidEntry = this.interactions.find(i => i.type === 'first-input');return fidEntry ? fidEntry.duration : null;}calculateCLS() {return this.interactions.filter(i => i.type === 'layout-shift').reduce((sum, entry) => sum + entry.value, 0);}calculateLCP() {const lcpEntries = this.interactions.filter(i => i.type === 'largest-contentful-paint');return lcpEntries.length > 0 ? lcpEntries[lcpEntries.length - 1].startTime : null;}
}

性能分析工具 🔍

// 1. 性能分析器
class PerformanceAnalyzer {constructor() {this.thresholds = new Map();this.issues = [];}setThreshold(metric, value) {this.thresholds.set(metric, value);}analyzeMetrics(metrics) {this.issues = [];// 分析页面加载性能if (metrics.page) {this.analyzePageMetrics(metrics.page);}// 分析资源加载性能if (metrics.resources) {this.analyzeResourceMetrics(metrics.resources);}// 分析运行时性能if (metrics.runtime) {this.analyzeRuntimeMetrics(metrics.runtime);}return this.issues;}analyzePageMetrics(pageMetrics) {if (pageMetrics.ttfb > this.thresholds.get('ttfb')) {this.issues.push({type: 'warning',metric: 'ttfb',message: 'Time to First Byte is too high',value: pageMetrics.ttfb,threshold: this.thresholds.get('ttfb')});}if (pageMetrics.domReady > this.thresholds.get('domReady')) {this.issues.push({type: 'error',metric: 'domReady',message: 'DOM Ready time is too high',value: pageMetrics.domReady,threshold: this.thresholds.get('domReady')});}}analyzeResourceMetrics(resources) {const largeResources = resources.filter(r => r.size > this.thresholds.get('resourceSize'));if (largeResources.length > 0) {this.issues.push({type: 'warning',metric: 'resourceSize',message: 'Large resources detected',resources: largeResources});}}analyzeRuntimeMetrics(runtime) {if (runtime.memory && runtime.memory.usedJSHeapSize > this.thresholds.get('heapSize')) {this.issues.push({type: 'warning',metric: 'memory',message: 'High memory usage detected',value: runtime.memory.usedJSHeapSize});}if (runtime.fps() < this.thresholds.get('fps')) {this.issues.push({type: 'error',metric: 'fps',message: 'Low FPS detected',value: runtime.fps()});}}generateReport() {return {timestamp: new Date(),issueCount: this.issues.length,criticalIssues: this.issues.filter(i => i.type === 'error'),warnings: this.issues.filter(i => i.type === 'warning'),recommendations: this.generateRecommendations()};}generateRecommendations() {return this.issues.map(issue => {switch (issue.metric) {case 'ttfb':return 'Consider using a CDN or optimizing server response time';case 'domReady':return 'Optimize JavaScript execution and reduce blocking resources';case 'resourceSize':return 'Compress and optimize large resources';case 'memory':return 'Check for memory leaks and optimize memory usage';case 'fps':return 'Optimize animations and reduce DOM operations';default:return 'Review and optimize the affected area';}});}
}// 2. 性能监控仪表板
class PerformanceDashboard {constructor() {this.metrics = [];this.charts = new Map();}addMetric(metric) {this.metrics.push({...metric,timestamp: new Date()});this.updateCharts();}createChart(type, data) {// 实现图表创建逻辑return {type,data,render: () => {// 渲染图表}};}updateCharts() {// 更新页面加载时间趋势this.charts.set('loadTime', this.createChart('line',this.metrics.map(m => ({x: m.timestamp,y: m.page.loadComplete}))));// 更新资源使用趋势this.charts.set('resources', this.createChart('bar',this.metrics.map(m => ({x: m.timestamp,y: m.resources.length}))));// 更新内存使用趋势this.charts.set('memory', this.createChart('area',this.metrics.map(m => ({x: m.timestamp,y: m.runtime.memory?.usedJSHeapSize}))));}generateReport(timeRange) {const filteredMetrics = this.metrics.filter(m => m.timestamp >= timeRange.start && m.timestamp <= timeRange.end);return {summary: this.calculateSummary(filteredMetrics),trends: this.calculateTrends(filteredMetrics),issues: this.findIssues(filteredMetrics)};}
}// 3. 性能优化建议生成器
class OptimizationAdvisor {constructor() {this.rules = new Map();}addRule(name, condition, recommendation) {this.rules.set(name, { condition, recommendation });}analyze(metrics) {const recommendations = [];for (const [name, rule] of this.rules) {if (rule.condition(metrics)) {recommendations.push({name,recommendation: rule.recommendation,priority: this.calculatePriority(metrics, name)});}}return recommendations.sort((a, b) => b.priority - a.priority);}calculatePriority(metrics, ruleName) {// 根据性能指标的严重程度计算优化建议的优先级const weights = {loadTime: 0.3,memory: 0.2,fps: 0.3,resources: 0.2};let score = 0;if (metrics.page?.loadComplete > 3000) {score += weights.loadTime;}if (metrics.runtime?.memory?.usedJSHeapSize > metrics.runtime?.memory?.jsHeapSizeLimit * 0.8) {score += weights.memory;}if (metrics.runtime?.fps() < 30) {score += weights.fps;}if (metrics.resources?.length > 50) {score += weights.resources;}return score;}
}

报警和通知系统 🚨

// 1. 报警管理器
class AlertManager {constructor() {this.alerts = new Map();this.handlers = new Map();}addAlert(name, condition, options = {}) {this.alerts.set(name, {condition,threshold: options.threshold,cooldown: options.cooldown || 5 * 60 * 1000, // 5分钟lastTriggered: 0,status: 'inactive'});}addHandler(severity, handler) {if (!this.handlers.has(severity)) {this.handlers.set(severity, []);}this.handlers.get(severity).push(handler);}checkAlerts(metrics) {const now = Date.now();const triggeredAlerts = [];for (const [name, alert] of this.alerts) {if (alert.status === 'inactive' && now - alert.lastTriggered > alert.cooldown) {if (alert.condition(metrics)) {alert.status = 'active';alert.lastTriggered = now;triggeredAlerts.push(name);}}}return triggeredAlerts;}async notify(alertName, data) {const alert = this.alerts.get(alertName);if (!alert) return;const handlers = this.handlers.get(alert.severity) || [];await Promise.all(handlers.map(handler => handler(alertName, data)));}
}// 2. 通知发送器
class NotificationSender {constructor() {this.channels = new Map();}addChannel(name, sender) {this.channels.set(name, sender);}async send(channel, message) {const sender = this.channels.get(channel);if (!sender) {throw new Error(`Channel ${channel} not found`);}try {await sender(message);} catch (error) {console.error(`Failed to send notification to ${channel}:`, error);throw error;}}async broadcast(message) {const results = await Promise.allSettled(Array.from(this.channels.entries()).map(([channel, sender]) => this.send(channel, message)));return results.reduce((summary, result, index) => {const channel = Array.from(this.channels.keys())[index];summary[channel] = result.status === 'fulfilled';return summary;}, {});}
}// 3. 报告生成器
class ReportGenerator {constructor() {this.templates = new Map();}addTemplate(name, template) {this.templates.set(name, template);}generateReport(data, templateName = 'default') {const template = this.templates.get(templateName);if (!template) {throw new Error(`Template ${templateName} not found`);}return template(data);}async saveReport(report, format = 'json') {const fileName = `performance-report-${new Date().toISOString()}.${format}`;switch (format) {case 'json':await fs.writeFile(fileName, JSON.stringify(report, null, 2));break;case 'html':await fs.writeFile(fileName, this.generateHtmlReport(report));break;case 'pdf':await this.generatePdfReport(report, fileName);break;default:throw new Error(`Unsupported format: ${format}`);}return fileName;}generateHtmlReport(report) {// 生成HTML格式的报告return `<!DOCTYPE html><html><head><title>Performance Report</title></head><body><h1>Performance Report</h1><div class="metrics">${this.renderMetrics(report.metrics)}</div><div class="issues">${this.renderIssues(report.issues)}</div><div class="recommendations">${this.renderRecommendations(report.recommendations)}</div></body></html>`;}
}

最佳实践建议 💡

  1. 性能监控策略
// 1. 性能预算管理器
class PerformanceBudgetManager {constructor() {this.budgets = new Map();}setBudget(metric, limit) {this.budgets.set(metric, limit);}checkBudget(metric, value) {const limit = this.budgets.get(metric);if (!limit) return true;return value <= limit;}generateBudgetReport(metrics) {const report = {timestamp: new Date(),violations: [],status: 'pass'};for (const [metric, limit] of this.budgets) {const value = metrics[metric];if (value > limit) {report.violations.push({metric,limit,value,overage: value - limit});report.status = 'fail';}}return report;}
}// 2. 性能监控配置管理器
class MonitoringConfigManager {constructor() {this.config = {sampleRate: 0.1,metrics: new Set(),alertThresholds: new Map()};}setSampleRate(rate) {if (rate < 0 || rate > 1) {throw new Error('Sample rate must be between 0 and 1');}this.config.sampleRate = rate;}enableMetric(metric) {this.config.metrics.add(metric);}disableMetric(metric) {this.config.metrics.delete(metric);}setAlertThreshold(metric, threshold) {this.config.alertThresholds.set(metric, threshold);}shouldCollect() {return Math.random() < this.config.sampleRate;}
}// 3. 性能数据存储管理器
class MetricsStorageManager {constructor() {this.storage = new Map();this.retention = 30 * 24 * 60 * 60 * 1000; // 30天}store(metrics) {const timestamp = Date.now();this.storage.set(timestamp, metrics);this.cleanup();}cleanup() {const cutoff = Date.now() - this.retention;for (const [timestamp] of this.storage) {if (timestamp < cutoff) {this.storage.delete(timestamp);}}}query(timeRange) {const results = [];for (const [timestamp, metrics] of this.storage) {if (timestamp >= timeRange.start && timestamp <= timeRange.end) {results.push({ timestamp, metrics });}}return results;}
}

结语 📝

JavaScript性能监控系统是保证应用性能和用户体验的关键工具。通过本文,我们学习了:

  1. 性能指标的收集和分析
  2. 性能监控工具的实现
  3. 报警和通知系统的构建
  4. 性能报告的生成
  5. 最佳实践和优化建议

💡 学习建议:在实施性能监控时,要注意平衡监控的全面性和系统性能的开销。选择合适的采样率和监控指标,避免监控系统本身成为性能瓶颈。同时,要建立完善的报警机制和响应流程,确保能够及时发现和解决性能问题。


如果你觉得这篇文章有帮助,欢迎点赞收藏,也期待在评论区看到你的想法和建议!👇

终身学习,共同成长。

咱们下一期见

💻

相关文章:

JavaScript系列(58)--性能监控系统详解

JavaScript性能监控系统详解 &#x1f4ca; 今天&#xff0c;让我们深入探讨JavaScript的性能监控系统。性能监控对于保证应用的稳定性和用户体验至关重要。 性能监控基础概念 &#x1f31f; &#x1f4a1; 小知识&#xff1a;JavaScript性能监控是指通过收集和分析各种性能指…...

GESP2023年12月认证C++六级( 第三部分编程题(1)闯关游戏)

参考程序代码&#xff1a; #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <string> #include <map> #include <iostream> #include <cmath> using namespace std;const int N 10…...

git 新项目

新项目git 新建的项目如何进行git 配置git git config --global user.name "cc" git config --global user.email ccexample.com配置远程仓库路径 // 添加 git remote add origin http://gogs/cc/mc.git //如果配错了&#xff0c;删除 git remote remove origin初…...

系统URL整合系列视频一(需求方案)

视频 系统URL整合系列视频一&#xff08;需求方案&#xff09; 视频介绍 &#xff08;全国&#xff09;某大型分布式系统Web资源URL整合需求实现方案讲解。当今社会各行各业对软件系统的web资源访问权限控制越来越严格&#xff0c;控制粒度也越来越细。安全级别提高的同时也增…...

Vue.js 使用组件库构建 UI

Vue.js 使用组件库构建 UI 在 Vue.js 项目中&#xff0c;构建漂亮又高效的用户界面&#xff08;UI&#xff09;是很重要的一环。组件库就是你开发 UI 的好帮手&#xff0c;它可以大大提高开发效率&#xff0c;减少重复工作&#xff0c;还能让你的项目更具一致性和专业感。今天…...

计算图 Compute Graph 和自动求导 Autograd | PyTorch 深度学习实战

前一篇文章&#xff0c;Tensor 基本操作5 device 管理&#xff0c;使用 GPU 设备 | PyTorch 深度学习实战 本系列文章 GitHub Repo: https://github.com/hailiang-wang/pytorch-get-started PyTorch 计算图和 Autograd 微积分之于机器学习Computational Graphs 计算图Autograd…...

51单片机入门_05_LED闪烁(常用的延时方法:软件延时、定时器延时;while循环;unsigned char 可以表示的数字是0~255)

本篇介绍编程实现LED灯闪烁&#xff0c;需要学到一些新的C语言知识。由于单片机执行的速度是非常快的&#xff0c;如果不进行延时的话&#xff0c;人眼是无法识别(停留时间要大于20ms)出LED灯是否在闪烁所以需要学习如何实现软件延时。另外IO口与一个字节位的数据对应关系。 文…...

如何获取sql数据中时间的月份、年份(类型为date)

可用自带的函数month来实现 如&#xff1a; 创建表及插入数据&#xff1a; create table test (id int,begindate datetime) insert into test values (1,2015-01-01) insert into test values (2,2015-02-01) 执行sql语句,获取月份&#xff1a; select MONTH(begindate)…...

【单层神经网络】softmax回归的从零开始实现(图像分类)

softmax回归 该回归分析为后续的多层感知机做铺垫 基本概念 softmax回归用于离散模型预测&#xff08;分类问题&#xff0c;含标签&#xff09; softmax运算本质上是对网络的多个输出进行了归一化&#xff0c;使结果有一个统一的判断标准&#xff0c;不必纠结为什么要这么算…...

使用开源项目:pdf2docx,让PDF转换为Word

目录 1.安装python 2.安装 pdf2docx 3.使用 pdf2docx 转换 PDF 到 Word pdf2docx&#xff1a;GitCode - 全球开发者的开源社区,开源代码托管平台 环境&#xff1a;windows电脑 1.安装python Download Python | Python.org 最好下载3.8以上的版本 安装时记得选择上&#…...

保姆级教程Docker部署KRaft模式的Kafka官方镜像

目录 一、安装Docker及可视化工具 二、单节点部署 1、创建挂载目录 2、运行Kafka容器 3、Compose运行Kafka容器 4、查看Kafka运行状态 三、集群部署 四、部署可视化工具 1、创建挂载目录 2、运行Kafka-ui容器 3、Compose运行Kafka-ui容器 4、查看Kafka-ui运行状态 …...

ChatGPT提问技巧:行业热门应用提示词案例--咨询法律知识

ChatGPT除了可以协助办公&#xff0c;写作文案和生成短视频脚本外&#xff0c;和还可以做为一个法律工具&#xff0c;当用户面临一些法律知识盲点时&#xff0c;可以向ChatGPT咨询获得解答。赋予ChatGPT专家的身份&#xff0c;用户能够得到较为满意的解答。 1.咨询法律知识 举…...

openRv1126 AI算法部署实战之——Tensorflow模型部署实战

在RV1126开发板上部署Tensorflow算法&#xff0c;实时目标检测RTSP传输。视频演示地址 rv1126 yolov5 实时目标检测 rtsp传输_哔哩哔哩_bilibili ​ 一、准备工作 从官网下载tensorflow模型和数据集 手动在线下载&#xff1a; https://github.com/tensorflow/models/b…...

STM32 TIM定时器配置

TIM简介 TIM&#xff08;Timer&#xff09;定时器 定时器可以对输入的时钟进行计数&#xff0c;并在计数值达到设定值时触发中断 16位计数器、预分频器、自动重装寄存器的时基单元&#xff0c;在72MHz计数时钟下可以实现最大59.65s的定时 不仅具备基本的定时中断功能&#xff…...

51单片机 05 矩阵键盘

嘻嘻&#xff0c;LCD在RC板子上可以勉强装上&#xff0c;会有一点歪。 一、矩阵键盘 在键盘中按键数量较多时&#xff0c;为了减少I/O口的占用&#xff0c;通常将按键排列成矩阵形式&#xff1b;采用逐行或逐列的“扫描”&#xff0c;就可以读出任何位置按键的状态。&#xf…...

SSRF 漏洞利用 Redis 实战全解析:原理、攻击与防范

目录 前言 SSRF 漏洞深度剖析 Redis&#xff1a;强大的内存数据库 Redis 产生漏洞的原因 SSRF 漏洞利用 Redis 实战步骤 准备环境 下载安装 Redis 配置漏洞环境 启动 Redis 攻击机远程连接 Redis 利用 Redis 写 Webshell 防范措施 前言 在网络安全领域&#xff0…...

kubernetes学习-配置管理(九)

一、ConfigMap &#xff08;1&#xff09;通过指定目录&#xff0c;创建configmap # 创建一个config目录 [rootk8s-master k8s]# mkdir config[rootk8s-master k8s]# cd config/ [rootk8s-master config]# mkdir test [rootk8s-master config]# cd test [rootk8s-master test…...

python 语音识别

目录 一、语音识别 二、代码实践 2.1 使用vosk三方库 2.2 使用SpeechRecognition 2.3 使用Whisper 一、语音识别 今天识别了别人做的这个app,觉得虽然是个日记app 但是用来学英语也挺好的,能进行语音识别,然后矫正语法,自己说的时候 ,实在不知道怎么说可以先乱说,然…...

一文速览DeepSeek-R1的本地部署——可联网、可实现本地知识库问答:包括671B满血版和各个蒸馏版的部署

前言 自从deepseek R1发布之后「详见《一文速览DeepSeek R1&#xff1a;如何通过纯RL训练大模型的推理能力以比肩甚至超越OpenAI o1(含Kimi K1.5的解读)》」&#xff0c;deepseek便爆火 爆火以后便应了“人红是非多”那句话&#xff0c;不但遭受各种大规模攻击&#xff0c;即便…...

[mmdetection]fast-rcnn模型训练自己的数据集的详细教程

本篇博客是由本人亲自调试成功后的学习笔记。使用了mmdetection项目包进行fast-rcnn模型的训练&#xff0c;数据集是自制图像数据。废话不多说&#xff0c;下面进入训练步骤教程。 注&#xff1a;本人使用linux服务器进行展示&#xff0c;Windows环境大差不差。另外&#xff0…...

linux之kylin系统nginx的安装

一、nginx的作用 1.可做高性能的web服务器 直接处理静态资源&#xff08;HTML/CSS/图片等&#xff09;&#xff0c;响应速度远超传统服务器类似apache支持高并发连接 2.反向代理服务器 隐藏后端服务器IP地址&#xff0c;提高安全性 3.负载均衡服务器 支持多种策略分发流量…...

AI Agent与Agentic AI:原理、应用、挑战与未来展望

文章目录 一、引言二、AI Agent与Agentic AI的兴起2.1 技术契机与生态成熟2.2 Agent的定义与特征2.3 Agent的发展历程 三、AI Agent的核心技术栈解密3.1 感知模块代码示例&#xff1a;使用Python和OpenCV进行图像识别 3.2 认知与决策模块代码示例&#xff1a;使用OpenAI GPT-3进…...

中南大学无人机智能体的全面评估!BEDI:用于评估无人机上具身智能体的综合性基准测试

作者&#xff1a;Mingning Guo, Mengwei Wu, Jiarun He, Shaoxian Li, Haifeng Li, Chao Tao单位&#xff1a;中南大学地球科学与信息物理学院论文标题&#xff1a;BEDI: A Comprehensive Benchmark for Evaluating Embodied Agents on UAVs论文链接&#xff1a;https://arxiv.…...

在HarmonyOS ArkTS ArkUI-X 5.0及以上版本中,手势开发全攻略:

在 HarmonyOS 应用开发中&#xff0c;手势交互是连接用户与设备的核心纽带。ArkTS 框架提供了丰富的手势处理能力&#xff0c;既支持点击、长按、拖拽等基础单一手势的精细控制&#xff0c;也能通过多种绑定策略解决父子组件的手势竞争问题。本文将结合官方开发文档&#xff0c…...

centos 7 部署awstats 网站访问检测

一、基础环境准备&#xff08;两种安装方式都要做&#xff09; bash # 安装必要依赖 yum install -y httpd perl mod_perl perl-Time-HiRes perl-DateTime systemctl enable httpd # 设置 Apache 开机自启 systemctl start httpd # 启动 Apache二、安装 AWStats&#xff0…...

Linux简单的操作

ls ls 查看当前目录 ll 查看详细内容 ls -a 查看所有的内容 ls --help 查看方法文档 pwd pwd 查看当前路径 cd cd 转路径 cd .. 转上一级路径 cd 名 转换路径 …...

家政维修平台实战20:权限设计

目录 1 获取工人信息2 搭建工人入口3 权限判断总结 目前我们已经搭建好了基础的用户体系&#xff0c;主要是分成几个表&#xff0c;用户表我们是记录用户的基础信息&#xff0c;包括手机、昵称、头像。而工人和员工各有各的表。那么就有一个问题&#xff0c;不同的角色&#xf…...

css的定位(position)详解:相对定位 绝对定位 固定定位

在 CSS 中&#xff0c;元素的定位通过 position 属性控制&#xff0c;共有 5 种定位模式&#xff1a;static&#xff08;静态定位&#xff09;、relative&#xff08;相对定位&#xff09;、absolute&#xff08;绝对定位&#xff09;、fixed&#xff08;固定定位&#xff09;和…...

html-<abbr> 缩写或首字母缩略词

定义与作用 <abbr> 标签用于表示缩写或首字母缩略词&#xff0c;它可以帮助用户更好地理解缩写的含义&#xff0c;尤其是对于那些不熟悉该缩写的用户。 title 属性的内容提供了缩写的详细说明。当用户将鼠标悬停在缩写上时&#xff0c;会显示一个提示框。 示例&#x…...

Java毕业设计:WML信息查询与后端信息发布系统开发

JAVAWML信息查询与后端信息发布系统实现 一、系统概述 本系统基于Java和WML(无线标记语言)技术开发&#xff0c;实现了移动设备上的信息查询与后端信息发布功能。系统采用B/S架构&#xff0c;服务器端使用Java Servlet处理请求&#xff0c;数据库采用MySQL存储信息&#xff0…...