编写文本时不使用Markdown或HTML解析。
对于等宽文本,使用 st.code。
函数签名[source] | |
---|---|
st.text(body, *, help=None) | |
参数 | |
body (str) | 要显示的字符串。 |
help (str) | 一个可选的工具提示,显示在文本旁边。 |
示例
import streamlit as st st.text("This is text\n[and more text](that's not a Markdown link).")
还有问题吗?
我们的 论坛 充满了有用的信息和Streamlit专家。