R语言 导航栏文本颜色夸托

qyzbxkaa  于 2023-04-27  发布在  其他
关注(0)|答案(1)|浏览(108)
project: 
  type: website
  output-dir: docs

website: 
  title: "Driving Adoption: Smart Manufacturing Technologies"
  back-to-top-navigation: true
  page-footer:
    background: "#f1f1f1"
    foreground: "#164a58"
    left: 
      - text: "GitHub Repo"
        url: "https://github.com/wsuppmc/driving-adoption-metrics"

  navbar: 
    background: "#f1f1f1"
    foreground: "#164a58"
    search: true
    link: false
    right: 
      - text: "Home"
        href: Quartopage.qmd
  

format: 
  html:
    embed-resources: true
    page-layout: full
    toc: false
    css: styles.css
    footer: footer.html

我想将“主页”的颜色更改为#164a58,既然它在导航栏中,我该如何操作
我尽力了

.navbar .nav-item a[text='Quartopage.qmd'] {
  color: #164a58;
}

我还以为能成功呢

gwbalxhn

gwbalxhn1#

如果要更改与Quartopage.qmd关联的Home的颜色,请尝试以下操作:

.navbar li.nav-item a.nav-link a[href*="Quartopage.html"] span {
  color: #164a58 !important;
}

如果你想改变导航栏中所有链接文本的颜色,请尝试以下方法

.navbar li.nav-item a.nav-link span {
  color: #164a58 !important;
}

相关问题