English 中文(简体)
动态网页浏览好描述的做法?
原标题:Dynamic webpage sliding good scripting practice?
  • 时间:2012-01-12 09:59:25
  •  标签:
  • html
  • css

我想写一个网站,在左边有一个菜单:

当点击这个菜单上的一个项目时,现场的滑坡或缩小(但不应选择滚动或缩小)。

然而,现在用户与网页上的一些内容(而不是菜单)发生互动时,网站的滑坡正确。

因此,no reloading the website!

例如,菜单包含home<>和account

if the user is on home and clicks on acount the site slides down (but he should not have the option to scroll down by himself)!

现在,在account上,当他点击一个叫做“Edit account”的纽顿时,现场滑坡(但不是菜单)右上一页时,他不能在把现场滑坡拯救回account时,把他的账户开上。

在第一站点上,头盔和脚步行不走。

这里是我写在jsfiddle上的小例子。

我知道,这将非常冷静,但我并不希望用户需要牺牲网站的负荷速度,仅仅为了冷却的滑动效应!

现在我的问题是:这是良好的方案拟订做法吗?

最佳回答

如果相信权利,你想要像我的网站“www.ohlookawebsite.com”这样的东西,那么你需要做的是用jquery来做。 例如,展示这种效果

<div id="navagation">

<div id="home" onclick="homeClick()">Home</div>
<div id="about" onclick="aboutClick()">About</div>
<div id="account" onclick="accountClick()">Account</div>

</div>

这将是 n,因此,你可以在网页上贴上<条码>、>、div>,同时在网页上贴上<条码>:无;,例如;

<div id="boxHome">
Welcome to the home page!
</div>

<div id="boxAbout" style="display: none;">
Welcome To the About Page!
</div>

<div id="boxAccount" style="display: none;>
You re account info!
</div>

You will need to the use jquery and javascript to show different "Pages"

function homeClick(){
    $("#boxAbout").fadeOut(500);
    $("#boxAccount").fadeOut(500);

    $("#home").css("color", "green");   
    $("#boxHome").delay(500).fadeIn(1000);
}

http://jsfiddle.net/gM4hB/4/“rel=“nofollow”http://jsfiddle.net/gM4hB/4/。

Hope this helps

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签