·pseudo-elements
*

pseudo-elements

raphaelsalaja/userinterface-wiki

现代 CSS 伪元素,无需额外的 DOM 节点即可进行样式设计。在实现视图转换、添加装饰层或设置本机浏览器 UI 样式时使用。触发涉及 ::before、::after、视图转换、背景样式或减少视觉效果 JavaScript 的任务。

102安装·0热度·@raphaelsalaja

安装

$npx skills add https://github.com/raphaelsalaja/userinterface-wiki --skill pseudo-elements

SKILL.md

Modern CSS pseudo-elements provide direct styling hooks into browser-native features—dialogs, popovers, view transitions—reducing the need for JavaScript. Sometimes you don't need to install a library; the browser has you covered.

| ::before / ::after | Decorative layers, icons, hit targets | | ::view-transition-group(name) | Control view transition animations | | ::view-transition-old(name) | Style the outgoing snapshot | | ::view-transition-new(name) | Style the incoming snapshot | | ::backdrop | Style dialog/popover backdrops | | ::placeholder | Style input placeholders |

Create anonymous inline elements as first/last child. Require content to render.

现代 CSS 伪元素,无需额外的 DOM 节点即可进行样式设计。在实现视图转换、添加装饰层或设置本机浏览器 UI 样式时使用。触发涉及 ::before、::after、视图转换、背景样式或减少视觉效果 JavaScript 的任务。 来源:raphaelsalaja/userinterface-wiki。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/raphaelsalaja/userinterface-wiki --skill pseudo-elements
分类
*创意媒体
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 pseudo-elements?

现代 CSS 伪元素,无需额外的 DOM 节点即可进行样式设计。在实现视图转换、添加装饰层或设置本机浏览器 UI 样式时使用。触发涉及 ::before、::after、视图转换、背景样式或减少视觉效果 JavaScript 的任务。 来源:raphaelsalaja/userinterface-wiki。

如何安装 pseudo-elements?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/raphaelsalaja/userinterface-wiki --skill pseudo-elements 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/raphaelsalaja/userinterface-wiki