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

样式,草稿

```html

<style> /* 深色笔记核心样式 */ details.note { margin: 1em 0; border-radius: 6px; overflow: hidden; background: #2d3436; transition: all 0.3s ease; } details.note:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); } details.note summary { padding: 0.8em 1em 0.8em 2.5em; /* 为图标留出空间 */ font-weight: 600; cursor: pointer; list-style: none; position: relative; } /* 标题文本样式(无链接时) */ details.note summary:not(:has(a)) { color: #f1f1f1; } /* 标题链接样式(有链接时) */ details.note summary a { color: inherit; text-decoration: none; display: block; } details.note summary a:hover { text-decoration: underline; } /* 通用展开/折叠图标 */ details.note summary::before { content: "▸"; position: absolute; left: 0.8em; transition: transform 0.2s ease; } details.note[open] summary::before { transform: rotate(90deg); } details.note summary::-webkit-details-marker { display: none; } /* 内容区域样式 */ details.note > div, details.note > p { padding: 0.8em 1em 1em 2.5em; margin: 0; color: #dfe6e9; line-height: 1.6; } /* 蓝色(默认)笔记 */ details.note { border-left: 4px solid #0984e3; } details.note summary { background: rgba(9, 132, 227, 0.15); } details.note summary::before { color: #74b9ff; } details.note summary a { color: #74b9ff; } details.note summary a:hover { color: #a29bfe; } /* 黄色笔记(新增) */ details.note.yellow { border-left-color: #fdcb6e; } details.note.yellow summary { background: rgba(253, 203, 110, 0.15); } details.note.yellow summary::before { color: #fdcb6e; } details.note.yellow summary a { color: #fdcb6e; } details.note.yellow summary a:hover { color: #ffeaa7; } /* 红色笔记(新增) */ details.note.red { border-left-color: #ff7675; } details.note.red summary { background: rgba(255, 118, 117, 0.15); } details.note.red summary::before { color: #ff7675; } details.note.red summary a { color: #ff7675; } details.note.red summary a:hover { color: #ffb8b8; } /* 绿色笔记 */ details.note.green { border-left-color: #55efc4; } details.note.green summary { background: rgba(85, 239, 196, 0.15); } details.note.green summary::before { color: #55efc4; } details.note.green summary a { color: #55efc4; } details.note.green summary a:hover { color: #8affde; } /* 题目链接样式 */ .note-problem { margin: 0.8em 0; padding: 0.8em; border-radius: 4px; background: #393e46; border: 1px solid rgba(255, 255, 255, 0.08); transition: transform 0.2s ease; } .note-problem:hover { transform: translateX(4px); } .note-problem a { color: #74b9ff; font-weight: 500; text-decoration: none; } .note-problem a:hover { color: #a29bfe; text-decoration: underline; } .note-problem .problem-desc { margin: 0.5em 0 0 1.2em; color: #b2bec3; font-size: 0.95em; line-height: 1.5; } /* 分类描述 */ .category-desc { color: #b2bec3; padding: 0.5em 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); margin-bottom: 1em; } /* 代码块样式 */ details.note pre { background: #1a1a1a; color: #f8f9fa; padding: 1em; border-radius: 4px; margin: 0.8em 0 0 0; overflow-x: auto; font-family: 'Courier New', monospace; } details.note code { font-family: 'Courier New', monospace; background: rgba(255, 255, 255, 0.1); padding: 0.2em 0.4em; border-radius: 3px; } </style> <!-- 使用示例 --> <!-- 1. 带链接的蓝色笔记(默认) --> <details class="note" open> <summary><a href="https://oi-wiki.org/basic/" target="_blank">基础算法题目汇总</a></summary> <p class="category-desc">以下是基础算法领域的经典练习题,按难度递增排列:</p> <div class="note-problem"> <a href="https://www.luogu.com.cn/problem/P1001" target="_blank">洛谷 P1001 A+B Problem</a> <div class="problem-desc">入门级题目,考察基本输入输出能力。</div> </div> </details> <!-- 2. 不带链接的黄色笔记 --> <details class="note yellow"> <summary>易错点提醒</summary> <p>以下是编程中常见的错误类型:</p> <ul> <li>数组越界访问(特别是循环边界条件)</li> <li>整数溢出(需注意数据范围)</li> <li>未初始化变量的使用</li> </ul> </details> <!-- 3. 带链接的红色笔记 --> <details class="note red"> <summary><a href="https://oi-wiki.org/error/" target="_blank">常见错误分析</a></summary> <p class="category-desc">竞赛中容易失分的典型错误:</p> <div class="note-problem"> <a href="https://www.luogu.com.cn/problem/P1068" target="_blank">洛谷 P1068 分数线划定</a> <div class="problem-desc">排序边界处理错误,容易忽略同分情况。</div> </div> </details> <!-- 4. 不带链接的绿色笔记 --> <details class="note green"> <summary>优化技巧总结</summary> <p>提升程序效率的常用方法:</p> <ul> <li>使用位运算替代乘除法</li> <li>预先计算避免重复运算</li> <li>合理选择数据结构减少时间复杂度</li> </ul> </details> <!-- 5. 代码示例笔记 --> <details class="note"> <summary>解题代码示例(无链接)</summary> <p>洛谷 P1001 参考代码:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b << endl; return 0; }</code></pre> </details>

```

http://www.jsqmd.com/news/40253/

相关文章:

  • IDEA开发过程中Artifact和Maven有什么区别
  • 2025年电脑自动裁剪机供货商权威推荐榜单:卷布装置/电脑绗缝机/高速电脑裥棉机源头厂家精选
  • 易基因:郑州大学第一附属医院孙同文教授团队利用表观多组学揭示二甲双胍通过DNA甲基化和羟甲基化双向调控减轻肝损伤的保护机制|项目文章
  • 20232302 2025-2026-1《网络与系统攻防技术》实验五实验报告
  • 2025年11月有感
  • kettle 从excel中读取需要同步的表到另一个数据库中
  • 安徽知名的商标注册:2025年专业服务机构权威评测
  • 小马算力暖冬特惠营:百万算力金 + 万元京东卡,11.12
  • 2025 年 11 月断桥铝窗/门/系统窗/门窗/窗户厂家推荐排行榜,专业定制与节能性能口碑之选
  • 2025年导向臂疲劳试验机定制厂家权威推荐榜单:电动疲劳试验机/封隔器疲劳试验机/疲劳检测设备源头厂家精选
  • 用Python实现数字识别的简单AI应用
  • 是的
  • Gitee Team:国产软件研发智能化转型的破局者
  • 手把手教你部署智能合约 - all-in
  • 2025年泳池篷房实力厂家权威推荐榜单:篮球训练篷房/篮球场篷房/游泳馆篷房源头厂家精选
  • 免密登录
  • 什么是CRM系统:CRM系统定义、功能与2025年9款最佳CRM系统推荐
  • 2025上海留学中介机构出国留学排名前三
  • 2025年轴承钢砂批发厂家权威推荐榜单:合金钢砂/钢砂/钢砂价格源头厂家精选
  • antd form.item内部的value会生效吗
  • Proxmox VE9.0优化-删除订阅窗
  • Springboot病人跟踪治疗信息管理系统e40z6(程序+源码+数据库+调试部署+创建环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
  • Visual Studio 2026 正式版发布 - 适用于 Windows 上 .NET 和 C++ 开发人员的最全面 IDE
  • Burp Suite Professional 2025.11 发布,新增功能简介
  • 数据库主备与MHA架构对比
  • Proxmox VE9.0优化-换源
  • 基于Session和Redis实现短信验证码登录 - 教程
  • 深入解析:高可用架构实战:SpringBoot+MongoDB构建AI原生应用
  • 代涂高者——《机器学习》总结笔记
  • 2025年五个女博士品牌可信度分析:深度拆解科研底色与市场真实反馈