html - "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:
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
解决方案
假设您的所有页面都是 html 并且上面有此代码,您可以删除按钮active
上的类Show All
并将其添加到您想要突出显示的正确页面中。
我理解你的问题正确吗?
推荐阅读
- azure-sql-database - 使用和保护分片数据
- javascript - 验证正则表达式 JavaScript 中的可分辨名称 (DN) 代码
- python - 使用 GetFirmwareEnvironmentVariableW 将 UEFI 变量读入具有 ctypes、WinDLL 和 WinAPI 的缓冲区
- linux - X86 致命错误的 GEM5 完整系统模拟:没有要加载的内核
- java - 改进聚合查询以获得不同的结果
- python - NER 通过 NLTK 使用 Stanford CoreNLP API
- sql - 通过 select 语句在 ORACLE SQL 中添加具有空度量的行
- java - Prometheus 在“不可读”属性上抓取错误
- javascript - jQuery Sortable复制原始列表中的已删除项目
- numpy - 在 pytorch 中显示错误分类的图像