CosmoAI commited on
Commit
58479ec
·
1 Parent(s): f4dd738

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -37
app.py CHANGED
@@ -3,43 +3,37 @@ import streamlit as st
3
  # Add a custom CSS style for the background video and centered button
4
  st.markdown(
5
  """
6
- <style>
7
- .fullscreen-bg {
8
- position: fixed;
9
- top: 0;
10
- right: 0;
11
- bottom: 0;
12
- left: 0;
13
- overflow: hidden;
14
- z-index: -1;
15
- }
16
- .fullscreen-bg video,
17
- .fullscreen-bg img {
18
- width: 100%;
19
- height: auto;
20
- }
21
- .centered-button {
22
- position: absolute;
23
- top: 50%;
24
- left: 50%;
25
- transform: translate(-50%, -50%);
26
- z-index: 1;
27
- }
28
- </style>
 
 
 
 
 
 
 
 
29
  """,
30
  unsafe_allow_html=True
31
  )
32
-
33
- # Add the background video or GIF
34
- st.markdown(
35
- """
36
- <div class="fullscreen-bg">
37
- <video loop muted autoplay playsinline>
38
- <source src="universe.mp4" type="video/mp4">
39
- Your browser does not support the video tag.
40
- </video>
41
- <button class="centered-button">Explore Infinite</button>
42
- </div>
43
- """,
44
- unsafe_allow_html=True
45
- )
 
3
  # Add a custom CSS style for the background video and centered button
4
  st.markdown(
5
  """
6
+ <html lang="en">
7
+ <head>
8
+ <meta charset="UTF-8">
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+ <style>
11
+ body {
12
+ margin: 0;
13
+ padding: 0;
14
+ overflow: hidden;
15
+ }
16
+ video {
17
+ position: fixed;
18
+ top: 50%;
19
+ left: 50%;
20
+ transform: translate(-50%, -50%);
21
+ min-width: 100%;
22
+ min-height: 100%;
23
+ width: auto;
24
+ height: auto;
25
+ z-index: -1;
26
+ }
27
+ </style>
28
+ <title>Fullscreen Video Example</title>
29
+ </head>
30
+ <body>
31
+ <video autoplay loop muted playsinline>
32
+ <source src="universe.mp4" type="video/mp4">
33
+ Your browser does not support the video tag.
34
+ </video>
35
+ </body>
36
+ </html>
37
  """,
38
  unsafe_allow_html=True
39
  )