Skip to main content

text

Function text 

Source
pub fn text<'a>(content: impl Into<StrRef<'a>>) -> Text<'a>
Expand description

构造一个文本原子节点(同时支持静态字符串 &'static str 与 fmt!(cx, ...) 生成的 StrRef<'a>)。

未显式调用 .size(...) / .color(...) 时,自动继承父容器 Div 上设置的 .text_xs() / .text_color(...)。