闪闪发光的板,右边的对齐徽标

发布于 2025-02-02 03:07:34 字数 811 浏览 4 评论 0原文

是否可以将标题中的徽标完全移至右侧? 我已经附上了一张照片,我希望它看起来像。 这是mwe

徽标右

library(shiny)
library(shinydashboard)

ui <- function(){

dashboardPage(
    dashboardHeader(title = tags$a(href = 'https://google.com',
                                           tags$img(src = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png', height= 50,width= 50, align = "right"),
                                           'Title')),
  dashboardSidebar( sidebarMenu(id="side", menuItem("Option1", tabName="op1"),

                                menuItem("Option2", tabName="op2"))
),


  body=dashboardBody())}


server <- function(input, output, session) {}

shinyApp(ui, server)

Is it possible to move the logo in the header completely to the right side?
I have attached a pic how I would like it to look like.
here is a MWE

logo to the right

library(shiny)
library(shinydashboard)

ui <- function(){

dashboardPage(
    dashboardHeader(title = tags$a(href = 'https://google.com',
                                           tags$img(src = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png', height= 50,width= 50, align = "right"),
                                           'Title')),
  dashboardSidebar( sidebarMenu(id="side", menuItem("Option1", tabName="op1"),

                                menuItem("Option2", tabName="op2"))
),


  body=dashboardBody())}


server <- function(input, output, session) {}

shinyApp(ui, server)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

憧憬巴黎街头的黎明 2025-02-09 03:07:34

您可以将其包装在li下拉的包装中。尝试一下

library(shiny)
library(shinydashboard)

ui <- function(){
  
  dashboardPage(
    dashboardHeader(
      title = "Demo",
      tags$li(class = "dropdown",
              tags$a(href = 'https://google.com',
                     tags$img(src = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png', height= 50,width= 50, align = "right")
              )
      ),
      dropdownMenuOutput('messageMenu')
    ),
    dashboardSidebar( sidebarMenu(id="side", menuItem("Option1", tabName="op1"),
                                  
                                  menuItem("Option2", tabName="op2"))
    ),
    
    
    body=dashboardBody())}


server <- function(input, output, session) {}

shinyApp(ui, server)

You could wrap it in a li wrapper of class dropdown. Try this

library(shiny)
library(shinydashboard)

ui <- function(){
  
  dashboardPage(
    dashboardHeader(
      title = "Demo",
      tags$li(class = "dropdown",
              tags$a(href = 'https://google.com',
                     tags$img(src = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png', height= 50,width= 50, align = "right")
              )
      ),
      dropdownMenuOutput('messageMenu')
    ),
    dashboardSidebar( sidebarMenu(id="side", menuItem("Option1", tabName="op1"),
                                  
                                  menuItem("Option2", tabName="op2"))
    ),
    
    
    body=dashboardBody())}


server <- function(input, output, session) {}

shinyApp(ui, server)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文