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”
)