jquery - css jquery position 固定元素在右边。在 Firefox 中动画 BUG

标签 jquery css firefox

我为我的问题创建了一个 fiddle :

fiddle

$('#move').click(function (e) {
    e.preventDefault();

    $(this).not('.up').animate({
        bottom: '50%'
    }, 1000, function () {
        $(this).addClass('up');
    });

    $('.up').animate({
        bottom: '0%'
    }, 1000, function () {
        $(this).removeClass('up');
    });
});

Firefox(我的版本:19.0.2)有一个bug。

当你点击红色按钮时,它会跳到右边(距离恰好是滚动条的宽度)。 当它位于右侧并且您调整窗口(或 fiddle 框架)的大小时,它会跳回。

我做错了什么吗?有什么好的解决方案可以解决吗?

最佳答案

好吧,如果你改变宽度属性,那么即使在 firefox 上它也能正常工作

试试这个

改变

width:100px 

min-width:100px;

希望对您有所帮助。

关于jquery - css jquery position 固定元素在右边。在 Firefox 中动画 BUG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15704727/

相关文章:

javascript - jQuery 步骤与 Bootstrap 验证器

javascript - 使用 jQuery 播放声音时摆脱延迟时间

javascript - 将文件拖到 Firefox 时 dropEffect 不起作用

javascript - 如何使用 jQuery 更改图像 src

php - Jquery Nestable 输出到 mysql 数据库

javascript - 我如何使用 html、css 制作这样的东西?不是表格标签,只需使用列表标签 ex) <li> <ol> <ul>

html - 如何使用 Bootstrap 为移动站点设置容器 div 的宽度

html - 是否可以使用图像(html)高度和宽度标签覆盖图像的 css 高度和宽度?

javascript - 为什么 window.Close() 在 Firefox 中不起作用?

JavaScript 在新窗口中打开,而不是选项卡