【问题标题】:How to add logo to right hand corner of navbar in flexdashboard?如何在 flexdashboard 导航栏的右上角添加徽标?
【发布时间】:2020-12-04 18:17:37
【问题描述】:

我正在使用 flexdashboard 包在 R 中构建仪表板(下图)。我正在寻找一种解决方案,在我的nav-bar 的右上角添加一个徽标,以保持我的nav-bar 的大小不变

这是我的 YAML

---
title: "Inflation & PSCE Outlook"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---
<style>
.navbar, [data-toggle=tab], .navbar-brand  {   background-color:#75002B;   border-color:black;   color:white; }
</style>



【问题讨论】:

    标签: r flexdashboard


    【解决方案1】:

    您可以使用徽标选项为仪表板指定徽标图像,如下所示。

    在右侧添加 logo 可以使用下面的 css 来完成。

    ---
    title: "Inflation & PSCE Outlook"
    output: 
      flexdashboard::flex_dashboard:
        orientation: columns
        vertical_layout: fill
        logo: path/to/logo.png
    ---
    <style>
    .navbar, [data-toggle=tab], .navbar-brand  {   background-color:#75002B;   border-color:black;   color:white; }
    
    .navbar-logo img {
        position: absolute;
        right: 0px;
    }
    </style>
    

    【讨论】:

      猜你喜欢
      • 2023-03-13
      • 1970-01-01
      • 2021-04-09
      • 1970-01-01
      • 1970-01-01
      • 2018-11-15
      • 2018-10-24
      • 1970-01-01
      • 2015-04-06
      相关资源
      最近更新 更多