html 突出显示选项卡:版本5

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 突出显示选项卡:版本5相关的知识,希望对你有一定的参考价值。

<!--
Now pages can be "grouped". To give a page a group you need to specify it in the pages YAML Front Matter:
-->

---
title: blah
categories: blah
group: "navigation"
---

<!--
Finally you can use your new code! Wherever you need your navigation to go in your template, simply "call" your include file and pass it some pages and the group you want to display:
-->

<ul>
  {% assign pages_list = site.pages %}
  {% assign group = 'navigation' %}
  {% include pages_list %}
</ul>

<!--
Put the following code in a file in the _includes folder at: ./_includes/pages_list
-->

{% for node in pages_list %}
  {% if group == null or group == node.group %}
    {% if page.url == node.url %}
      <li class="active"><a href="{{node.url}}" class="active">{{node.title}}</a></li>
    {% else %}
      <li><a href="{{node.url}}">{{node.title}}</a></li>
    {% endif %}
  {% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}

以上是关于html 突出显示选项卡:版本5的主要内容,如果未能解决你的问题,请参考以下文章

html 突出显示选项卡:版本3

html 突出显示选项卡:版本2

html 突出显示选项卡:版本1

更改 UIPicker 突出显示的选项卡宽度

CSS 突出显示活动选项卡

如何在适当的选项卡中保持突出显示?