如何设计导航与scolling每个东西是单页? [英] how to design navigation with scolling every thing is single page?

查看:51
本文介绍了如何设计导航与scolling每个东西是单页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们任何人帮助我......





单页设计(家庭,关于我们)联系方式,...... ..)当我自动scoll自动菜单hove也改变使用jquery

Hi friends any one help me ...


In single page design(home, AboutUs) contactus, .....) when i will scoll automatically menu hove also change using jquery

推荐答案

为了您的查询,请查看下面的jsFiddle为此。

从堆栈溢出引用的小提琴 [ ^ ]

以下方法在不同的上下文中,但如果不滚动,可以帮助单页应用程序想要导航。

您可以使用代码项目中的大多数文章,当提供内容并立即移动到标题时。

过程只是带有html和标识符的游戏。

假设在一个页面中你有HOME,ABOUT,CONTACT US链接,所有三个内容都在同一页面上标题为Home,About&联系我们。因此,您可以为以下各项提供ID: -

For your query, please look into the below jsFiddle for this.
Fiddle for this referenced from stack overflow[^]
The below method is in different context but can help for a single page application if without scrolling one wants to navigate.
You can use as is used in most of the articles in code project, when the contents are provided and you move to the heading immediately.
The process is just the play with html and identifiers.
Suppose in a single page you have HOME, ABOUT, CONTACT US links and all three contents are there on the same page oviously with the heading as Home, About & Contact Us. So, you can provide id to each like below:-
<h2 id="homeId">Home</h2>
// Content goes here..
<h2 id="aboutId">About</h2>
// Content goes here..
<h2 id="contactUsId">Contact Us</h2>
// Content goes here..





类似于家庭,关于&的链接/ href所在的地方/菜单联系我们,使用如下所示的href =#id:



Similarly the place/menu where the link/href would be there for the Home, About & Contact Us, use the href="#id" like below:

<a href="#homeId">Home</a>
<a href="#aboutId">About</a>
<a href="#contactUsId">Contact Us</a>



这将直接转到单个页面上单击菜单的内容。

希望这会有所帮助。

如果我预计你的查询错了,请回复你的查询。

谢谢。

:))


This will take straight to the content on click of the menu on a single page.
Hope This helps.
Post back your queries if I anticipated your query to be wrong.
Thanks.
:)


这篇关于如何设计导航与scolling每个东西是单页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆