如何将徽标添加到 flexdashboard 中导航栏的右上角?
How to add logo to right hand corner of navbar in flexdashboard?
我正在使用 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>
您可以使用徽标选项为仪表板指定徽标图像,如下所示。
可以使用以下方法将徽标添加到右侧 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>
我正在使用 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>
您可以使用徽标选项为仪表板指定徽标图像,如下所示。
可以使用以下方法将徽标添加到右侧 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>