Streamlit container key not visible in HTML - Stack Overflow

admin2025-04-17  2

I wish to use the “key” attribute for precise styling of the elements via custom CSS.

Code

with st.container(key = "container1"):
   st.markdown(<div><img src="./myimage.png"</div>)

Issue: No st-key-container1 found in the elements of the rendered HTML (browser inspector). The image is shown correctly.

Deployment: local

Streamlit version: streamlit==1.41.1

Thank you !

转载请注明原文地址:http://anycun.com/QandA/1744860690a88644.html