簡體   English   中英

streamlit st.info 信息框中的文本對齊

[英]Text align in streamlit st.info information box

如何在 流光信息框中對齊文本(對齊)streamlit

import streamlit as st

# Generate Three equal columns
c1, c2, c3 = st.columns((1, 1, 1))

with c1:
    st.info("""Streamlit is more than just a way to make data apps, it's also a community of creators that share their apps and ideas and help each other make their work better. Please come join us on the community forum. We love to hear your questions, ideas, and help you work through your bugs — stop by today!""") 

在此處輸入圖像描述

應用樣式。

代碼

import streamlit as st

mystyle = '''
    <style>
        p {
            text-align: justify;
        }
    </style>
    '''

st.markdown(mystyle, unsafe_allow_html=True)

# Generate Three equal columns
c1, c2, c3 = st.columns((1, 1, 1))

with c1:
    st.info("""Streamlit is more than just a way to make data apps, 
            it's also a community of creators that share their apps 
            and ideas and help each other make their work better. Please 
            come join us on the community forum. We love to hear your questions, 
            ideas, and help you work through your bugs — stop by today!""")

輸出

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM