Элемент SVG не виден в потокеHtml

Программисты Html
Anonymous
Элемент SVG не виден в потоке

Сообщение Anonymous »

Ниже приведен мой код с кругом внутри элемента SVG, который я хочу отображать через Jinja2, используя St.HTML в потоке. Проблема в том, что континер видим, но элемент SVG не виден. это пусто. См. Ниже код. < /p>

Код: Выделить всё

html,body {
height: 100%;
background-color: #404040;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}

.container {
display: flex;
width: 500px;
/* Extended width for pipe */
height: 500px;
border: 3px solid #EEEEEE;
justify-content: center;
align-items: center;
border-radius: 20px;

}

.drawing {
position: relative;
width: 2000px;
/* Extended width for pipe */
height: 600px;
}

.circle-svg {
width: 100%;
height: 100%;
}

.c3 {
fill: none;
stroke: grey;
stroke-width: 10;
}

< /code>









< /code>
< /div>
< /div>
< /p>
код Python: < /p>
def cutting_dimention(html_content):
# Directly use the HTML content without treating it as a file path
template = Template(html_content)
rendered_html = template.render()  # Render the HTML with Jinja2
st.text(rendered_html)  # Display rendered HTML text
st.html(rendered_html)  # Display rendered HTML as an HTML block in Streamlit
вызовите функцию с помощью HTML Content
tunting_dimention (my_circle)


Подробнее здесь: https://stackoverflow.com/questions/795 ... -streamlit

Вернуться в «Html»