html - 在 Rshiny 仪表板中在背景图像上显示内容的问题
问题描述
我的问题是无法在 rshiny 仪表板的选项卡中使用内联 css 在背景图像上呈现内容。我只设法得到背景图像。
tabItem(tabName = "welcome",
tags$div(
tags$div(
tags$img(src='game background image.png',style="position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;"),
tags$div(
tags$img(
src = "Platershiny game logo.png",
style = 'display: block;
margin-left: auto;
margin-right: auto;
width: 50%;'),
tags$br(),
tags$h2('WELCOME!',
style='color:#D6AC18;font-family:Times New Roman;align:center;'),
tags$br(),
tags$h3(
'About Game',
style='color:#D6AC18;font-family:Times New Roman;;align:center;'),
tags$p("Under construction currently",style='color:#D6AC18;font-family:Times New Roman;;align:center;'),
tags$h3("Instructions",style='color:#D6AC18;font-family:Times New Roman;;align:center;'),
tags$p("There are no rules for this game yet. We are simply demonstrating the elements of a two-player game.",style='color:#D6AC18;font-family:Times New Roman;;align:center;'),
tags$h3("Team Members",style='color:#D6AC18;font-family:Times New Roman;;align:center;'),
actionButton("register", "Register"),
actionButton("login", "Login"),
tags$h4("Logged in as:"),
htmlOutput("loggedInAs")
)
),style="position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
display:flex;"))
解决方案
推荐阅读
- java - Hibernate 删除用户和 user_type 而不是只删除用户
- python - 如果在读取 csv 时使用 index_col = 0,则无法使用 pandas 删除列
- php - 带有 PHP 的语言切换器,具有简短语法的二维数组
- python - 字典大小在增加一个元素时减小
- css - xpath在r中进行网络抓取时返回空文本
- c# - Xaml - 如何使用 ViewModel 中的 ImageSource
- django - 为什么传递给 urls 的 django 用户名参数直接连接以及如何防止它
- javascript - 如何解决 Google Chrome 中 Roboto 字体加载的问题?
- python - 与线性表达式相乘时找到非线性表达式的根
- c - How can I reset a struct in a function?