naive-ui/demo/documentation/components/element/zhCN/basic.md
2020-02-03 19:44:42 +08:00

24 lines
536 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 基础
当配置提供者提供深色主题时,它应用 `n-dark-theme` class。当配置提供者提供浅色主题时它应用 `n-light-theme` class。若非二者之一它不会应用额外的 class正如其他特定主题的 Naive UI 组件。
创建特定主题的组件十分管用。
```html
<n-element as="span" class="myel">
我的元素
</n-element>
```
```css
.myel {
transition: color .3s cubic-bezier(.4, 0, .2, 1);
}
.myel.n-light-theme {
color: green;
}
.myel.n-dark-theme {
color: yellow;
}
```