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

纯div+css+js弹出窗

目的:实现弹出窗、仅关闭弹窗之后才能操作。自适应宽度与高度、当文本内容太多时、添加滚动条效果。

效果图

在这里插入图片描述

源码

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Popup Box</title><style>.popup {display: none;position: fixed;top: 0;left: 0;width: 100%;height: 100%;background-color: rgba(0, 0, 0, 0.5);z-index: 9999;}.popup-content {background-color: #fff;width: 800px;height: 800px;margin: 100px auto;padding: 10px;border-radius: 5px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);}.close {color: #aaa;float: right;font-size: 28px;font-weight: bold;cursor: pointer;}/* 全局设置滚动条样式 */*::-webkit-scrollbar {width: 10px;background-color: #f5f5f5;}*::-webkit-scrollbar-thumb {background-color: #ccc;border-radius: 5px;}</style></head><body><button id="popupButton"  onclick="openPopup()">Open Popup</button><div id="popup" class="popup"><div class="popup-content"><span class="close" onclick="closePopup()">&times;</span><h2>This is a Popup</h2> <div id="popup-div" class="popup-div"></div></div></div><script>const popup = document.getElementById("popup");const popupDiv = document.getElementById("popup-div");function openPopup() {popup.style.display = "block";document.getElementById("popup-div").innerHTML=
'<p><span class="text-huge">第一章1</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章2</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章3</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章4</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章5</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章6</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章7</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章8</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章9</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章10</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章11</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章12</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章13</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章13</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章14</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章14</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章15</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章15</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章16</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章16</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章17</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章17</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章18</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章18</li></ul><p>&nbsp;</p>'+
'<p><span class="text-huge">第一章19</span></p><p><span class="text-big">第一章</span></p><p>第一章</p><p><span class="text-small">第一章</span></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><p><mark class="marker-yellow"><strong>第一章</strong></mark></p><ul><li style="margin-left:40px;">第一章</li><li style="margin-left:40px;">第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章</li><li style="margin-left:40px;">第一章第一章第一章第一章第一章第一章第一章第一章19</li></ul><p>&nbsp;</p>';popupDiv.style.cssText = "width:800px;height:500px;background-color:rgba(0, 0, 0, 0.5); overflow:scroll;";}function closePopup() {popup.style.display = "none";popupDiv.innerHTML='';popupDiv.style.cssText = "width:0px;height:0px;";}</script></body>
</html>

核心代码

在这里插入图片描述
1.父容器设置宽高(popup-content) 子容器(popup-div)设置滚动条支持
2.由于div内容是通过js动态设置、所以样式也需要动态设置

复制以上代码 HTML验证

相关文章:

纯div+css+js弹出窗

目的&#xff1a;实现弹出窗、仅关闭弹窗之后才能操作。自适应宽度与高度、当文本内容太多时、添加滚动条效果。 效果图 源码 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8" /><meta name"viewport"…...

python如何使用RSA加密,避免明文密码

如果在python脚本中出现明文密码&#xff0c;就不符合安全的需求&#xff0c;而md5加密又不够安全&#xff0c;推荐RSA加密&#xff0c;原理不多说&#xff0c;直接说怎么弄 首先执行这个函数&#xff0c;生成公钥和私钥并写入文件 #pip3 install pycryptodome from Crypto i…...

easegen将教材批量生成可控ppt课件方案设计

之前客户提出过一个需求&#xff0c;就是希望可以将一本教材&#xff0c;快速的转换为教学ppt&#xff0c;虽然通过人工程序脚本的方式&#xff0c;已经实现了该功能&#xff0c;但是因为没有做到通用&#xff0c;每次都需要修改脚本&#xff0c;无法让客户自行完成所有流程&am…...

通过远程控制软件实现企业高效协作

在这个信息技术迅猛发展的时代&#xff0c;远程办公已经成为一种趋势&#xff0c;而远程控制软件则是连接分散团队的重要工具。技术的革新不仅推动了远程控制软件的广泛应用&#xff0c;也为现代办公带来了高效的协作体验。本文将探讨远程控制软件的发展&#xff0c;并以RayLin…...

交换机与路由器的区别

交换机和路由器是网络中的两种关键设备&#xff0c;它们各自承担不同的功能&#xff0c;主要区别体现在以下几个方面&#xff1a; 一、工作层次与功能 交换机&#xff1a; 工作层次&#xff1a;交换机主要工作在OSI模型的第二层&#xff0c;即数据链路层。 功能&#xff1a;交…...

每天40分玩转Django:Django国际化

Django国际化 一、今日学习内容概述 学习模块重要程度主要内容国际化基础⭐⭐⭐⭐⭐基本概念、配置设置字符串翻译⭐⭐⭐⭐⭐翻译标记、消息文件模板国际化⭐⭐⭐⭐模板标签、过滤器动态内容翻译⭐⭐⭐⭐模型字段、表单翻译 二、国际化基础配置 # settings.py# 启用国际化 …...

游戏开发-UE4高清虚幻引擎教程

简介 Unreal Engine 4 相关教程&#xff0c;涵盖美术流程、独立游戏制作编程、虚拟现实实战、高级材质系统、蓝图可视化编程及进阶、RPG 游戏与特效开发、VR 交互虚拟漫游等方面。包含大量视频教程、工程文件及源码&#xff0c;如 UE4 零基础美术教程中有火焰材质等案例及模型…...

信号与系统基础知识3:小波变换

信号与系统基础知识3&#xff1a;小波变换 一、本文内容与前置知识点1. 本文内容2. 前置知识点 二、小波变换介绍1. 一个变化忽快忽慢的信号&#xff08;1&#xff09;DFT的频谱数据信息&#xff08;2&#xff09;DFT的漏掉的频谱数据信息 2. 小波变换-时域和频域之间的妥协&am…...

memory泄露分析方法(Binder,Window,View篇)

View泄露&#xff1a;从Hprof找大量重复的view&#xff0c;点击查看text文案如果相同则找产品他们确认是否合理 window泄露&#xff1a;代码或dumpsys window来监测是否有大量同名window&#xff0c;不能用windowtoken来辨别是否重复window&#xff0c;每个window token都不一样…...

如何阻止盗版软件在互联网上传播

阻止公司软件的盗版传播是一项复杂但重要的任务&#xff0c;可以通过技术、法律和管理手段相结合来实现。以下是一些有效的措施&#xff1a; 1. 技术措施 1.1 软件保护 使用软件加密&#xff1a;采用强大的代码混淆、加密技术和反篡改机制。硬件绑定&#xff1a;将软件激活与…...

设计模式--装饰器模式【结构型模式】

设计模式的分类 我们都知道有 23 种设计模式&#xff0c;这 23 种设计模式可分为如下三类&#xff1a; 创建型模式&#xff08;5 种&#xff09;&#xff1a;单例模式、工厂方法模式、抽象工厂模式、建造者模式、原型模式。结构型模式&#xff08;7 种&#xff09;&#xff1…...

CTFHUB-web进阶-php

我们用蚁剑中的这个插件来做这些关卡 一.LD_PRELOAD 发现这里有一句话木马&#xff0c;并且把ant给了我们&#xff0c;我们直接连接蚁剑 右键 选择模式&#xff0c;都可以试一下&#xff0c;这里第一个就可以 点击开始 我们进入到目录&#xff0c;刷新一下&#xff0c;会有一个…...

谷歌开发者工具 - 网络篇

Chrome DevTools - Network网络篇 一、官网二、主要用途三、网络篇1.网络工具栏&#xff08;1&#xff09;网络活动&#xff08;2&#xff09;保留日志&#xff08;3&#xff09;网络状况&#xff08;4&#xff09;网络设置 2.搜索和过滤&#xff08;1&#xff09;搜索&#xf…...

量子退火与机器学习(1):少量数据求解未知QUBO矩阵,以少见多

文章目录 前言ー、复习QUBO&#xff1a;中药配伍的复杂性1.QUBO 的介入&#xff1a;寻找最佳药材组合 二、难题&#xff1a;QUBO矩阵未知的问题1.为什么这么难&#xff1f; 三、稀疏建模(Sparse Modeling)1. 欠定系统中的稀疏解2. L1和L2的选择&#xff1a; 三、压缩感知算法(C…...

JDK高频面试题(包重点)

一、什么是JDK JDK&#xff08;Java Development Kit&#xff09;即 Java 开发工具包&#xff0c;是 Java 编程的基础与核心&#xff0c;由 Sun Microsystems&#xff08;现归属于 Oracle 公司 &#xff09;开发&#xff0c;主要作用如下&#xff1a; 1、提供编译环境 它包含了…...

本地部署 LLaMA-Factory

本地部署 LLaMA-Factory 1. 本地部署 LLaMA-Factory2. 下载模型3. 微调模型3-1. 下载数据集3-2. 配置参数3-3. 启动微调3-4. 模型评估3-5. 模型对话3-6. 导出模型3-7. 使用 vllm 推理 1. 本地部署 LLaMA-Factory 下载代码&#xff0c; git clone https://github.com/hiyouga/…...

内置ALC的前置放大器D2538A/D3308

一、概述 D2538A/D3308是芯谷科技推出的带有ALC&#xff08;自动电平控制&#xff09;的前置音频放大器芯片&#xff0c;最初产品为单声道/立体声收录机及盒式录音机而开发&#xff0c;作为录音/回放的磁头放大器使用&#xff1b;由于产品的高增益、低噪声及ALC外部可调的特性&…...

20241227解决使用向日葵远程工具连接ubuntu20.04.5出现黑屏的问题

20241227解决使用向日葵远程工具连接ubuntu20.04.5出现黑屏的问题 2024/12/27 14:40 参考资料&#xff1a; 百度&#xff1a;先日葵 https://sunlogin.oray.com/ 贝锐向日葵 百度&#xff1a;向日葵 连接 ubuntu22.04.5 黑屏 https://blog.csdn.net/catssi/article/details/139…...

Thinkphp 使用workerman消息实现消息推送完整示例

1.版本说明&#xff1a;ThinkPHP6.0 、PHP8.0 2.实现原理 应用场景&#xff0c;监听用户登陆&#xff0c;修改用户登陆状态&#xff0c;通过心跳时间计算用户是否下线&#xff0c;其他应用场景自行修改逻辑即可。 第一步&#xff1a;安装workerman composer require topthin…...

Word论文交叉引用一键上标

Word论文交叉引用一键上标 1.进入Microsoft word使用CtrlH快捷键或单击替换按钮 2.在查找内容中输入[^#] 3.鼠标点击&#xff0c;标签为“替换为&#xff1a;”的文本框&#xff0c;注意光标一定要打在图红色方框圈中的文本框中&#xff01; 4.点击格式选择字体 5.勾选上标…...

使用vue3搭建前端模拟增删改查

主要工具 vue3 element-plus axios mockjs 使用mockjs模拟数据 import Mock from "mockjs"; // 内存模拟数据 const arr []; for (let i 0; i < 10; i) {arr.push({id: Mock.mock("id"),name: Mock.mock("cname"),place: Mock.mock("c…...

Stream API 的设计融合了多个经典设计模式

Stream API 的设计融合了多个经典设计模式&#xff1a; 1. 策略模式&#xff08;Strategy Pattern&#xff09; 策略模式定义了一个算法的家族&#xff0c;将每个算法封装起来&#xff0c;并使它们可以互换。Stream API 中的每个操作&#xff08;如 filter(), map()&#xff…...

京东零售数据可视化平台产品实践与思考

导读 本次分享题目为京东零售数据可视化平台产品实践与思考。 主要包括以下四个部分&#xff1a; 1. 平台产品能力介绍 2. 业务赋能案例分享 3. 平台建设挑战与展望 作者&#xff1a;梁臣 京东 数据产品架构师 01平台产品能力介绍 1. 产品矩阵 数据可视化产品是一种利用…...

mysql高频面试题

1. mysql里的索引类型 2. 聚簇索引和非聚簇索引的区别 聚簇索引适合场景: 主键、唯一性要求高的字段。需要对数据进行范围查询时。对数据的读取频繁,并且数据行的插入和删除较少时。非聚簇索引适合场景: 较多的查询条件,或者需要基于某些非主键字段进行查询时。需要创建多个…...

MySQL中Performance Schema库的详解(下)

昨天说了关于SQL语句相关的&#xff0c;今天来说说性能相关的&#xff0c;如果没有看过上篇请点传送门https://blog.csdn.net/2301_80479959/article/details/144693574?fromshareblogdetail&sharetypeblogdetail&sharerId144693574&sharereferPC&sharesource…...

算法day_7 算法练习

这是我在2024年12月25日的算法练习&#xff0c;加油&#xff01;(▽) 题目一 &#x1f4aa; 1337. 矩阵中战斗力最弱的 K 行 已解答 | 简单 题目描述 &#x1f4dd; 给你一个大小为 m * n 的矩阵 mat&#xff0c;矩阵由若干军人和平民组成&#xff0c;分别用 1 和 0 表示。…...

一文详解MacOS+CLion——构建libtorch机器学习开发环境

对于希望在本地环境中进行深度学习开发的开发者来说&#xff0c;配置合适的工具链是至关重要的一步。本文旨在帮助您在 macOS 操作系统上&#xff0c;利用 CLion IDE 和 PyTorch 的 C依赖库——libtorch&#xff0c;快速搭建起一个高效的开发环境。这里我们将一步步地讲解如何下…...

CSS系列(39)-- Shapes详解

前端技术探索系列&#xff1a;CSS Shapes详解 ✨ 致读者&#xff1a;探索形状布局的艺术 &#x1f44b; 前端开发者们&#xff0c; 今天我们将深入探讨 CSS Shapes&#xff0c;这个强大的形状布局特性。 基础形状 &#x1f680; 圆形与椭圆 /* 基础圆形 */ .circle {widt…...

kafka的备份策略:从备份到恢复

文章目录 一、全量备份二、增量备份三、全量恢复四、增量恢复 前言&#xff1a;Kafka的备份的单元是partition&#xff0c;也就是每个partition都都会有leader partiton和follow partiton。其中leader partition是用来进行和producer进行写交互&#xff0c;follow从leader副本进…...

Android着色器SweepGradient渐变圆环,Kotlin

Android着色器SweepGradient渐变圆环&#xff0c;Kotlin import android.content.Context import android.graphics.Canvas import android.graphics.Color import android.graphics.Paint import android.graphics.Path import android.graphics.SweepGradient import android…...

SQL 实战:聚合函数高级用法 – 多层分组与动态统计

在数据分析中&#xff0c;聚合函数如 COUNT()、SUM()、AVG()、MAX()、MIN() 等是最常用的工具之一。它们允许我们对大量数据进行汇总和统计。然而&#xff0c;随着业务需求的复杂化&#xff0c;我们常常需要进行更复杂的统计操作&#xff0c;例如多层次的分组统计、动态分组等。…...

从零创建一个 Django 项目

1. 准备环境 在开始之前&#xff0c;确保你的开发环境满足以下要求&#xff1a; 安装了 Python (推荐 3.8 或更高版本)。安装 pip 包管理工具。如果要使用 MySQL 或 PostgreSQL&#xff0c;确保对应的数据库已安装。 创建虚拟环境 在项目目录中创建并激活虚拟环境&#xff…...

Spring Boot 3.4新特性:RestClient和RestTemplate的重大更新详解

本文将深入探讨Spring Boot 3.4版本中关于RestClient和RestTemplate的重要更新。。 1. 背景介绍 在Spring生态系统中&#xff0c;HTTP客户端一直是一个重要的组件。从最早的RestTemplate&#xff0c;到WebClient&#xff0c;再到现在的RestClient&#xff0c;每一次演进都带来…...

ANSYS EMC Plus:谐振腔中的天线

概述 本博客说明了如何使用 EMA3D 和 MHARNESS 模拟工具来模拟腔内天线产生的电场。下面简要概述了完成模拟所需的步骤&#xff0c;视频链接中提供了完整的演示。 步骤1&#xff1a;定义模拟域 准备模拟的第一步是定义模拟域。该域应包含所有需要分析的几何图形。在此演示中…...

lv_ffmpeg学习及播放rtsp

lvgl8.3有ffmpeg支持 FFmpeg support typedef struct {lv_img_t img;lv_timer_t * timer;lv_img_dsc_t imgdsc;bool auto_restart;struct ffmpeg_context_s * ffmpeg_ctx; } lv_ffmpeg_player_t;typedef enum {LV_FFMPEG_PLAYER_CMD_START,LV_FFMPEG_PLAYER_CMD_STOP,LV_FFMP…...

Java前端基础—HTML

Java前端基础—HTML 目录 Java前端基础—HTML1.简介2.基础语法2.1HTML页面固定结构2.2标题标签2.3段落标签2.4换行标签2.5水平线标签2.6文本标签2.7图片标签2.8音频标签2.9视频标签2.10链接标签2.11列表标签2.12表格标签2.13表单标签2.14语义标签 1.简介 1.网页组成&#xff1…...

salesforce 控制 Experience Cloud 站点用户可以看到哪些用户

在 Salesforce 的 Experience Cloud 中&#xff0c;您可以通过多种方式控制站点用户&#xff08;如社区用户&#xff09;之间的可见性。这包括用户之间的信息可见性以及他们可以访问的其他用户数据。以下是几种方法和设置&#xff0c;用于实现对 Experience Cloud 站点用户可见…...

C语言实现尼科彻斯定理

1.题目&#xff1a; 2.分析 【1】怎么输出连续奇数&#xff1a;下面是输出m个连续奇数的代码 #include<stdio.h>int main(){int m,x;scanf("%d",&m);for(int i0;i<m:i){printf("%d",x);xx2;}return 0; } 【2】啥叫尼科彻斯定理&#xff1f;…...

【Ubuntu添加右键wine运行exe程序文件】

【前提】你在Ubuntu中安装了wine 【效果展示】右键在打开方式中显示用wine运行 以bilibli安装包为例&#xff0c;在B站安装包右键选择打开方式 省去了在终端中输入wine命令 【步骤】如何添加右键wine运行exe程序文件 新建一个文本文档 其中填入以下内容 [Desktop Entry]…...

7. Linux网络服务配置全面指南

本章目录&#xff1a; 引言7. 网络服务配置7.1 DNS服务器配置安装BIND配置区域文件创建区域文件测试与重启DNS服务示例图&#xff1a;DNS解析流程 7.2 Web服务器部署&#xff08;Apache/Nginx&#xff09;Apache与Nginx的选择安装Apache示例&#xff1a;部署静态网站安装Nginx配…...

深入探讨 Nginx 性能优化:从基础到高级的最佳实践

目录 引言Nginx 性能优化的意义Nginx 性能优化的主要方向系统层面的优化 4.1 优化操作系统的文件描述符4.2 调整 TCP 参数4.3 使用高效的磁盘 I/O 调度器 Nginx 配置优化 5.1 优化 worker 进程和连接数5.2 使用异步和非阻塞 I/O 模式5.3 配置 Gzip 压缩5.4 开启缓存和缓存控制…...

纯 HTML+CSS+JS 实现一个炫酷的圣诞树动画特效

纯 HTMLCSSJS 实现一个炫酷的圣诞树动画特效 前言 圣诞节快到了&#xff0c;今天给大家带来一个简单但是效果不错的圣诞树动画特效。这个特效完全使用原生 HTML、CSS 和 JavaScript 实现&#xff0c;包含闪烁的星星、随机彩灯等元素&#xff0c;非常适合节日气氛&#xff01;…...

Python使用requests_html库爬取掌阅书籍(附完整源码及使用说明)

教程概述 本教程先是幽络源初步教学分析掌阅书籍的网络结构&#xff0c;最后提供完整的爬取源码与使用说明&#xff0c;并展示结果&#xff0c;切记勿将本教程内容肆意非法使用。 原文链接&#xff1a;Python使用requests_html库爬取掌阅书籍&#xff08;附完整源码及使用说明…...

Linux网络——UDP的运用

Linux网络——UDP的运用 文章目录 Linux网络——UDP的运用一、引入二、服务端实现2.1 创建socket套接字2.2 指定网络接口并bind2.3 接收数据并处理2.4 整体代码2.5 IP的绑定的细节 三、用户端实现3.1 创建套接字3.2 指定网络接口3.3 发生数据并接收3.4 绑定问题 四、代码五、UD…...

axios

文章目录 [TOC](文章目录) 一、axios的基本使用axios请求1、引用axios,并发送请求axios发送请求的简化写法2、接受响应数据&#xff0c;并对响应的数据进行处理 三、axios拦截器&#xff08;instance&#xff09;1、请求拦截2、响应拦截 axios拦截器、vue中的路由守卫、servlet…...

MacOS下TestHubo安装配置指南

TestHubo是一款开源免费的测试管理工具&#xff0c; 下面介绍MacOS私有部署的安装与配置。TestHubo 私有部署版本更适合有严格数据安全要求的企业&#xff0c;支持在本地或专属服务器上运行&#xff0c;以实现对数据和系统的完全控制。 1、Mac 服务端安装 Mac安装包下载地址&a…...

vue2/3,Spring Boot以及生产环境跨域解决方案

vue2和vue3跨域解决方案 Vue 2 (基于 Webpack) 的跨域解决方案 1. 创建或编辑 vue.config.js 文件 Vue CLI为Webpack项目提供了简单的代理配置方式。你可以通过创建或编辑项目的根目录下的 vue.config.js 文件来设置开发服务器的代理规则&#xff1a; // vue.config.js mod…...

TestMAX/DFT Compiler:时序单元的类型、连接顺序和后DFT优化

相关阅读 TestMAX/DFT Compilerhttps://blog.csdn.net/weixin_45791458/category_12865937.html?spm1001.2014.3001.5482 时序单元的状态 未映射的时序单元(Unmapped Sequential Cell) 在Design Compiler读取了一个RTL设计后&#xff0c;Design Compiler内置的HDL Compiler工…...

Elasticsearch:analyzer(分析器)

一、概述 可用于将字符串字段转换为单独的术语&#xff1a; 添加到倒排索引中&#xff0c;以便文档可搜索。级查询&#xff08;如 生成搜索词的 match查询&#xff09;使用。 分析器分为内置分析器和自定义的分析器&#xff0c;它们都是由若干个字符过滤器&#xff08;chara…...

蓝桥杯——异或森林

问题描述 在一个神秘的世界中&#xff0c;存在着一个称为"异或森林"的地方。异或森林中的每个树木都拥有独特的力量。肖恩进入了这片森林&#xff0c;他得到了一个任务&#xff1a;找出数组中满足条件的连续子数组&#xff0c;使得连续子数组中所有元素异或运算结果…...