python - 中心流线型按钮

标签 python streamlit

如何使用 Streamlit 将按钮居中,以便该按钮仍可点击?这是一个返回随机数的按钮的小例子:

 import streamlit as st 
 import numpy as np

 if st.button('Click'): 
     rand = np.random.standard_normal()
     st.write(str(rand))

我已经看到了标题 Markdown 的解决方案,但没有看到诸如按钮之类的交互式元素的解决方案。

最佳答案

目前 Streamlit 不支持该功能,但我们正在努力(请参阅我们的 Roadmap 了解更多信息)。
随时将您的想法添加到 Customizable Layout for Streamlit讨论。

并感谢您使用 Streamlit!

关于python - 中心流线型按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60411457/

相关文章:

python - 使用 nlp/spacy 查找相似之处

python - 使用 Socket 发送原始 POST 请求

python - 如何获得两个四元数之间的角度?

Python 在带有 __init__.py 的文件夹中找不到我的自定义模块

javascript - 如何从 Javascript 向 Streamlit 发送数据?

python : Get many list from a list

python - Keras top_k_categorical_accuracy 指标与准确率相比极低

python - 属性错误: 'ColumnTransformer' object has no attribute '_name_to_fitted_passthrough'

python - 错误安装streamlit它说 "ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly"

python - Altair Hconcat - 是否可以在同一 HConCat 中为图表配置不同的轴?