Hello, Iām new to using streamlit and Iām having difficulties trying to position an animation, is it possible to apply css to position it? Or do I have to use columns
My code is simple because Iām training and I want to be able to move the animation, up, down, sideways.
import streamlit as st
import json
from streamlit_option_menu import option_menu
from streamlit_lottie import st_lottie
with open(āC:\TeleSpeed\style\style.cssā) as f:
st.markdown(f"{f.read()}",unsafe_allow_html=True)
def load_lottiefile(filepath:str):
with open(filepath,ārā) as f:
return json.load(f)
lottie_codding = load_lottiefile(r"C:\TeleSpeed\gif\animacao.json")
col1 , col2, col3 = st.columns([1,2,1])
with col2:
selected = option_menu(
menu_title = None,
options = [āLoginā,āCadastroā],
icons=[ādoor-open-fillā,āhdd-stack-fillā],
menu_icon=ācastā,
default_index=1,
orientation=āhorizontalā,
)
if selected == āLoginā:
with col2:
with st.form(āLoginā):
st.markdown(āPainel de loginā)
st.text_input(āEmailā, placeholder=āDigite aqui seu E-mailā)
st.text_input(āSenhaā, placeholder=āDigite aqui sua senhaā, type=āpasswordā)
st.form_submit_button(āEnviarā)
if selected == āCadastroā:
st.warning(āCadastroā)
st.markdown(āā"
.stlottie[data-key=āgifā] {
margin-top: 100px;
margin-right: 200px;
}
āā", unsafe_allow_html=True)
st_lottie(
lottie_codding,
speed=1,
key=āgifā
)