如何调整Streamlit侧边栏高度?现有CSS方案无效求助
求助:Streamlit侧边栏高度调整无效问题
我试了好几种用CSS调整Streamlit侧边栏高度的方法,下面是其中一种实现代码,但这个方案没解决我的问题。我在Streamlit论坛找到的建议方案也不管用,麻烦大家帮忙看看。
import streamlit as st st.markdown( """ <style> [data-testid="stSidebar"][aria-expanded="true"] > div:first-child { height: 80% ; } [data-testid="stSidebar"][aria-expanded="false"] > div:first-child { height: 80% } </style> """, unsafe_allow_html=True, ) st.sidebar.markdown("Adjust sidebar height")

内容的提问来源于stack exchange,提问作者Jamiu S.
相关产品推荐
相关产品推荐

