跳转到内容
打开/关闭搜索
搜索
打开/关闭菜单
5
条目
2
文件
8
用户
777
编辑
ANACHRONISM
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
打开/关闭外观设置菜单
无法加载外观设置。请检查您的网络连接并重试。
重试
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
登录
请求账号
查看“︁模板:收缩大标题/styles.css”︁的源代码
来自ANACHRONISM
查看
阅读
查看源代码
查看历史
相关页面
模板
讨论
更多操作
更多
工具
链入页面
相关更改
页面信息
←
模板:收缩大标题/styles.css
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
旅人
您可以查看和复制此页面的源代码。
/* ============================================ 收缩大标题 使用 <details> / <summary> 实现零 JS 折叠 ============================================ */ .fold { position: relative; margin: 1em 0; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } /* ---- 头部 ---- */ .fold__main { display: block; position: relative; padding: 1.2em 3.5em 1.2em 1.5em; background: #57000d; color: #fff; cursor: pointer; list-style: none; transition: background 0.3s ease; } .fold__main::marker { content: ""; } .fold__main:hover { background: #6b0011; } /* ---- 背景水印 ---- */ .fold__watermark { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 5em; font-weight: 900; line-height: 1; opacity: 0.15; pointer-events: none; z-index: 0; } /* ---- 标题组 ---- */ .fold__titles { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; line-height: 1.2; position: relative; z-index: 1; } .fold__title-cn { font-size: 2.5em; font-weight: 900; letter-spacing: 0.02em; } .fold__title-en { font-size: 1em; font-weight: bold; letter-spacing: 0.35em; } .fold__title-deco { font-size: 0.8em; font-weight: bold; letter-spacing: 0.25em; } /* ---- 折叠按钮 ---- */ .fold__button { position: absolute; right: 1.2em; top: 50%; transform: translateY(-50%); width: 1.5em; height: 1.5em; z-index: 2; } .fold__button::before, .fold__button::after { content: ""; position: absolute; left: 50%; top: 50%; background: #fff; transition: transform 0.3s ease, opacity 0.3s ease; } .fold__button::before { width: 1em; height: 2px; transform: translate(-50%, -50%); } .fold__button::after { width: 2px; height: 1em; transform: translate(-50%, -50%); } .fold[open] .fold__button::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; } /* ---- 内容区 ---- */ .fold__content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s ease; } .fold[open] .fold__content { grid-template-rows: 1fr; } .fold__content-inner { overflow: hidden; padding: 0 1.5em; color: #333; line-height: 1.6; transition: padding 0.4s ease; } .fold[open] .fold__content-inner { padding: 1em 1.5em; }
返回
模板:收缩大标题/styles.css
。
查看“︁模板:收缩大标题/styles.css”︁的源代码
来自ANACHRONISM