DiggBar如何工作?

Kin*_*tor 5 css asp.net-mvc digg

DiggBar如何工作?

我正在尝试制作一个ASP.NET MVC DiggBar克隆仅用于学习目的,是否有人建议如何为较低帧指定内容的URL?你会如何在MVC中构建它?

另外,我知道它是一个iFrame,但它们如何定位它,所以无论滚动它是否保持位于顶部?这是CSS魔术吗?

替代文字

编辑:我对你是否喜欢它们不感兴趣.我不会把它投入生产,我不是要问它们是不是好的设计.我只是〜想〜做一个.

我发现DiggBar很有用,我喜欢它.天啊,你可以通过两次点击关闭它!同样,reddit有一个reddit bar,可以选择加入(可能更好的方法).

tgh*_*ghw 6

基本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>
Run Code Online (Sandbox Code Playgroud)

你会在你自己的URL上有一个slug,它会映射到页面的URL,例如
d1oKo3 => http://news.bbc.co.uk/2/hi/technology/7991708.stm

你所有的观点必须做的是查找的映射,并把该页面的网址进入iframesrc.只是确保你有办法让用户选择退出,因为有些人不喜欢这种工具栏.