- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一些样式化的页面需要开始工作。加载栏是页面的一部分。加载栏将在页面离开时出现(因为后端可能需要一些时间来响应)。加载栏出现后需要在访问者等待下一页时“加载”。
代码在 IE 中运行良好,但在 Chrome 和 Safari 中有一个奇怪的错误。加载栏“出现”后,当在 Chrome 的开发者工具中选择该元素时,它无法加载除外
在下面找到 HTML CSS 和 JS。在此先感谢您提供的任何帮助。
<span id="loading-footer">
<p class="loading-bar-text">Loading:</p>
<div id="loading-bar"><div id="coloured-bar" style=""></div></div>
</span>
/*loading bar*/
#loading-footer { background-color: #444; height: 93px; margin-top: 27px; position: absolute; width: 411px; display: none; border-radius: 4px; -moz-border-radius:4px; -webkit-border-radius:4px; }
#loading-footer .loading-bar-text { color: #CCCCCC; font-family: helvetica; font-weight: bold; margin: 10% 0 0 16%; width: 0; display: inline-block; }
#loading-footer #loading-bar { background-color: #151515; display: inline-block; height: 10px; margin: 0 0 -2px 75px; width: 201px; border:2px solid #394040; border-radius: 7px; -moz-border-radius:7px; -webkit-border-radius:7px; overflow: hidden; }
#coloured-bar { background: url('../images/loadingcolor.gif') left top; overflow: hidden; width: 1px; height: 10px; margin: 0 0 0 -5px; z-index: 200;}
window.onbeforeunload = function() {
$("#loading-footer").stop().show('fast', function() {
$("#coloured-bar").stop().animate({
width: "250",
},{queue:false,duration:5000});
});
}
最佳答案
当我这样做时,它在 Google Chrome 中运行良好:
$(document).ready(function() { $("#loading-footer").stop().show('fast', function() { $("#coloured-bar").stop().animate({ width: "250", },{queue:false,duration:5000}); });})
查看实际效果 here .
您可能不想将它绑定(bind)到 $(document).ready
事件,而是绑定(bind)到 $(window).unload 事件,如下所示:
$(window).unload(function() { $("#loading-footer").stop().show('fast', function() { $("#coloured-bar").stop().animate({ width: "250", },{queue:false,duration:5000}); });})
关于javascript - Chrome : JQuery animate; only appears to work when selected in developer tools,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9599481/
我想使用 Google OR-Tools 解决车辆路径问题 (vrp),但使用与提供的元启发式不同的元启发式,它们是:贪婪下降、引导局部搜索、模拟退火、禁忌搜索和目标禁忌搜索。这就是此处文档中的解释:
对于 or-tools 中的 VRP,有没有办法让车辆从某些固定位置开始,但允许任意结束位置? 文档 https://developers.google.com/optimization/routin
我创建了新文件“Makefile.local”,并将“WINDOWS_SCIP_DIR=c:/Program Files/SCIPOptSuite”添加到文件中。 SCIP也编译成功,文件路径正确。
这个问题在这里已经有了答案: What are the Android SDK build-tools, platform-tools and tools? And which version sh
我正在尝试在 OR-TOOLS RL VRPTW 问题中强制执行位移长度约束。类次时长是车辆在服务中的总时间(运输 + 等待 + 服务),从到达第一个位置到离开最后一个位置。 它看起来像一个 Time
我正在尝试在 OR-TOOLS RL VRPTW 问题中强制执行位移长度约束。类次时长是车辆在服务中的总时间(运输 + 等待 + 服务),从到达第一个位置到离开最后一个位置。 它看起来像一个 Time
命令后: go build 显示错误: go tool: no such tool "link" 详细信息:我的系统是 windows 10 -> 64 位 go version: 1.11.5
我已经在我的 Ubuntu 桌面上安装了 go,在我关闭计算机之前它运行良好。 现在,当我启动我的机器并继续我的项目工作时,我明白了 $ go build go tool: no such tool
我正在为 Job-Shop 问题实现一个类似的解决方案,但有一个区别:我不知道必须执行每项任务的机器。解决这个问题也是问题的一部分。事实上,我们可以说,我正在尝试解决护士问题和工作车间问题的组合。 更
我知道Spring Tool Suite是为Spring开发而优化的,而Groovy / Grails是为Groovy / Grails开发的而优化的。 Groovy / Grails开发人员是否愿意
在 Chrome Dev Tools 中,我可以 Shift+单击检查器中的颜色来更改格式(Hex -> RGB -> HSL)。我可以在 Firefox Dev Tools 中做到这一点吗?我可以在
我目前正在评估谷歌或工具,只是注意到它本身并不是真正的求解器,而主要是与其他求解器的接口(interface)。我想知道的是这个框架使用哪些求解器来解决约束和路由问题。 我已经看透了https://d
我正在尝试使用命令 firebase init 初始化 Firebase 项目,但我收到消息 Error: Command requires authentication, please run fi
是什么决定了工具进入特定目录?例如,adb 位于 tools/但已移至 platform-tools/。为什么他们不能在同一个目录中? 最佳答案 platform-tools/ 主要包含从 Windo
我刚刚将 Android Studio 更新到了 2.3 版(金丝雀版)和最后的构建工具 'com.android.tools.build:gradle:2.3.0-alpha1' 以及当我打开布局并
我一直在使用 SQL Server 项目来管理数据库的结构。 首先我创建了项目,然后导入了一个数据库。 然后,当我需要更改架构时,比如更改字段名称,我会在 SQL Server 项目中进行,然后使用架
我正在尝试使用 Google OR-Tools 的 CP-Solver 解决问题。是否可以添加这样的约束:x1 异或 x2 异或 x3 == 0提前致谢。 最佳答案 AddBoolXOr of n 个
我需要为此获取源代码,但不幸的是,我无法在 jquerytools.org 上找到它的链接。该站点上的论坛也已关闭。有谁知道我可以从哪里获得这个来源或取消缩小它? 谢谢,罗布 最佳答案 你有没有试过继
我需要为此获取源代码,但不幸的是,我无法在 jquerytools.org 上找到它的链接。该站点上的论坛也已关闭。有谁知道我可以从哪里获得这个来源或取消缩小它? 谢谢,罗布 最佳答案 你有没有试过继
我正在使用Spring Tool Suite: 版本:3.9.0.RELEASE 建立编号:201707061903 平台:Eclipse Neon.3(4.6.3) 并安装了Gradle插件: Bu
我是一名优秀的程序员,十分优秀!