JQuery“floating”选项卡,如GetSatisfaction [英] JQuery "floating" tab like GetSatisfaction

查看:141
本文介绍了JQuery“floating”选项卡,如GetSatisfaction的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这张图片中创建一个标签/小部件/事件,如同反馈:

I want to create a tab/widget/thingymajiggy like the feedback-thing in this picture:

行为类似。我只需要点击重定向,我不需要所有其他的东西。

That behaves like this. I just need to redirect on click, I don't need all the other stuff.

我已经无法找到一个JQuery插件,这是 - 但也许我只是不知道正确的术语。

I have been unable to find a JQuery plugin, that does this - but maybe I just don't know the correct term.

...是的,我可以只是缓和感到满意,但我宁愿有一个很好的尝试和测试JQuery插件。

...And yes, I could just pillage getsatisfaction, but I would much rather have a nice tried and tested JQuery plugin.

推荐答案

你真的不需要Javascript。这是通过给予元素固定的位置来实现的:

You don't really need Javascript for this. This is achieved by giving an element a position of fixed:

<a id="floating_link" href="whatever.html">Go Somewhere</a>

#floating_link {
     position: fixed;
     right: 0;
     top: 400px;
     display: block;
     width: 50px;
     height: 125px;
     text-indent: -10000px;
     background-image: url(/my/image.jpg);
     overflow: hidden;
}


$ b 。您可以使用此插件来解决此问题。

如果你不关心IE6,那么你可以使用上面的。唯一的区别是IE6会将其视为一个绝对元素(所以它不会向下滚动页面,这不是一个大问题)

If you don't care about IE6, then you can just use the above. The only difference is that IE6 will treat it as an absolute element (so it won't scroll down with the page, which isn't a big deal)

这是一个工作的例子。您可以看到整个区域都是可点击的。

Here is an example of it at work. As you can see the entire area is clickable.

这篇关于JQuery“floating”选项卡,如GetSatisfaction的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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