首页 > 解决方案 > "Linking to another page" is over simplifying my question

问题描述

I'm building my website out from a template. It has an element named 'portfolio-filters.' It's on my blog page and looks like this:

portfolio-filters

With this, when a visitor clicks one of the buttons, all the corresponding content/posts appear underneath. If they click another button, those content/posts appear, and so on. When the 'Show All' button is click everything appears below.

On my home page I have four links: Travel Fashion Lifestyle Motivation

How do I code the links on the home page so that, for example, the person clicks the 'travel' button it will take them to the blog page with the 'travel' button highlighted and all the travel content/posts appearing below?

The typical code on my home page: ontravel (Link is inside a DIV Class)

The code of the portfolio-filters on the blog page:

<section class="small-gap filter-blog">
      <div class="container">
        <div class="row">
          <div class="col-lg-12">
            <div class="portfolio-filters">
              <ul>
                <li class="active" data-filter="*"><span>Show All</span></li>
                <li data-filter=".travel"><span>travel</span></li>
                <li data-filter=".fashion"><span>fashion</span></li>
                <li data-filter=".lifestyle"><span>lifestyle</span></li>
                <li data-filter=".Motivation"><span>Motivation</span></li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </section>

Is this possible?

Thank You Michael

标签: htmlcsshyperlink

解决方案


假设您的所有页面都是 html 并且上面有此代码,您可以删除按钮active上的类Show All并将其添加到您想要突出显示的正确页面中。

我理解你的问题正确吗?


推荐阅读