如何在DiggBar工作? [英] How does the DiggBar work?
问题描述
如何在DiggBar工作?
How does the DiggBar work?
我试图做一个ASP.NET MVC DiggBar克隆只是为了学习目的,没有任何人有关于如何指定下框的内容的URL的建议吗?你会如何去构建,在MVC?
I'm trying to make an ASP.NET MVC DiggBar clone just for learning purposes and does anyone have a suggestion on how to specify the url of the content for the lower frame? How would you go about constructing that in MVC?
另外,我知道这是一个iFrame,但他们怎么所以无论滚动它保持放置在顶部的位置呢?它是CSS魔法?
Also, I know that it is an iFrame, but how do they position it so regardless of scrolling it stays positioned at the top? Is it CSS magic?
编辑:我不感兴趣,你是否不喜欢他们。我不把一只投入生产,我不要求他们是否是好的设计或没有。我只是想〜〜做的。
I'm not interested in whether or not you like them. I am not putting one into production and I'm not asking for whether they are good design or not. I simply ~want~ to make one.
我觉得DiggBar有用,我喜欢它。该死的,你可以点击两次把它关掉!同样,reddit的具有被选择加入一个reddit的吧(可能是更好的办法)。
I find the DiggBar useful and I like it. Hell, you can turn it off in two clicks! Similarly, reddit has a reddit bar which is opt-in (probably better approach).
推荐答案
基本 HTML
是:
<html>
<head>
<style type="text/css">
#toolbar {position: fixed; top: 0; height: 40px; width: 100%; ... }
#page {width: 100%; height: 100%;}
</style>
</head>
<div id="toolbar">
All your toolbar stuff here.
</div>
<iframe id="page" name="page" src="http://url.to/page" frameborder="0" noresize="noresize"></iframe>
</html>
您会对自己的网址的蛞蝓映射到该网页的网址,例如 d1oKo3 =&GT; http://news.bbc.co.uk/2/hi/technology /7991708.stm
You would have a slug on your own URLs that maps to the page's URL, e.g.
d1oKo3 => http://news.bbc.co.uk/2/hi/technology/7991708.stm
您所有的观点必须做的是查找地图,并把该页面的网址输入的 IFRAME
的src
。只要确保你有办法让用户选择退出,因为有些人不喜欢这类工具栏。
All your view would have to do is look up the mapping and put the page's URL into the iframe
's src
. Just make sure you have a way for users to opt out, as some people don't like this sort of toolbar.
这篇关于如何在DiggBar工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!