[Question] 如何给一个组件设置浅色/深色模式可见性 #680
-
比如针对以下场景:
怎么让其在浅色/深色模式下仅显示对应的组件 |
Beta Was this translation helpful? Give feedback.
Answered by
pengzhanbo
Aug 21, 2025
Replies: 1 comment
-
我不确定这个需求是否需要作为广泛支持的需求。你可以参考主题对于 img 标签的 浅色/深色 模式切换样式 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SherkeyXD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我不确定这个需求是否需要作为广泛支持的需求。你可以参考主题对于 img 标签的 浅色/深色 模式切换样式
定义两个特殊的 css 类名,然后进行控制。