gpt4 book ai didi

像 GetSatisfaction 这样的 JQuery "floating"选项卡

转载 作者:技术小花猫 更新时间:2023-10-29 12:07:20 25 4
gpt4 key购买 nike

我想创建一个选项卡/小部件/thingymajiggy,就像这张图片中的反馈一样:

alt text

它的行为类似于 this .我只需要在点击时重定向,我不需要所有其他的东西。

我一直无法找到执行此操作的 JQuery 插件 - 但也许我只是不知道正确的术语。

...是的,我可以掠夺 getsatisfaction,但我更愿意拥有一个久经考验的 JQuery 插件。

最佳答案

您实际上并不需要 Javascript。这是通过给元素一个 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;
}

很遗憾,IE6 不支持fixed。您可以使用 this plugin 来解决这个问题.

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

Here is an example of it at work .如您所见,整个区域都是可点击的。

关于像 GetSatisfaction 这样的 JQuery "floating"选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1089523/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com