- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用 CSS 创建了一个预加载器。我想在预加载器完成后在幻灯片放映中显示图像。预加载完成后,图像应该会平滑淡入。这是我的代码结构。
<!DOCTYPE html>
<html>
<head>
<style>
#container{
display: block;
margin: 0px auto;
}
#preloader {
margin:10px;
width:300px;
height:1px;
background:#e1e1e1;
}
.fillcolour {
width:300px;
height:1px;
background:#888888;
position:absolute;
-moz-animation:fullexpand 5s ease-out;
-webkit-animation:fullexpand 5s ease-out;
}
@-moz-keyframes fullexpand {
0% { width:0px;}
100%{ width:175px;}
}
@-webkit-keyframes fullexpand {
0% { width:0px;}
100%{ width:175px;}
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('#preloader').fadeOut(2000);
$('#container').css({'display':'block'}).fadeIn(3000);
});
$(window).load(function(){
/*$('#preloader').fadeOut(2000).css({'opacity':0});
$('.fillcolour').fadeOut(2000).css({'opacity':0});
$('#container').css({'display':'block'}).fadeIn(3000);*/
});
</script>
</head>
<body>
<div id="container" style="display:none;">
<img src="1.jpg" style="width:300px;height:200px;"/>
</div>
<div id="preloader">
<span class="fillcolour"></span>
</div>
</body>
</html>
有人可以帮忙吗?请!
最佳答案
当你想要一个有序的调用电话时,当一个操作完成时另一个开始。使用 Jquery "complete" parameter .
尝试
$(document).ready(function(){
$('#preloader').fadeOut(2000, function(){
$('#container').css({'display':'block'}).fadeIn(3000);
});
});
关于jquery 为幻灯片设置自己的 css-preloader,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15265967/
我遇到的“预加载”的唯一设置是“无” - 有哪些选择? 我有一部很长的电影,需要一段时间才能开始(我假设是因为大小),我希望能够让它更快地播放。我认为让视频在页面加载后立即开始加载会给观众一个更快的
我正在为 PWA 开发一个 gatsby 主题/启动器,但我似乎无法摆脱以下控制台警告: The resource https://davidde.github.io/gatsby-starter-s
我正在使用 使资源加载速度更快的技术,但我没有看到对页面加载时间的可衡量影响。我不确定这是因为资源实际上没有被预加载,还是因为其他原因。 如果我使用 Firefox 进行调试,如何在 Firefox
如何正确预加载谷歌字体,而不在控制台中发出警告? 这是我的代码: 我已经在预加载链接中添加了 crossorigin 属性,但警告仍然存在 最佳答案 只需将跨域属性添加到主样式表
我正在从头开始学习 webpack。我已经学会了如何将 javascript 文件与 require 链接起来。我正在捆绑和缩小我的 js 文件,我正在用 watch 监听变化。我正在设置加载程序以将
我的 Rails 3.2 应用程序使用两个不同的数据库。主操作系统是 MySQL,而其他操作系统是 sqlserver 数据库: development: adapter: mysql2
我的响应式 flexslider 插件有问题。除非您在实际幻灯片中有许多图像,否则该插件可以正常工作。加载行为是 Not Acceptable 。 我希望有人可以帮助我使用以下 flexslider
我正在尝试修改页面上的控件以减少 session 依赖性。我目前无法访问页面本身,只能访问主要由 DataGrid 组成的控件。我正在尝试在回发时检索 DataGrid 信息,以便我可以操作数据并重新
我发现该指令在 Controls.pas(以及其他单元)中声明,我很高兴知道它的含义。 {$C PRELOAD} 据我所知 $C 表示断言控制,但是 PRELOAD 关键字是什么?是不是类似于“在预加
为了在加载远程内容时提供适当的安全级别,声明必须分别启用和禁用BrowserWindow的contextIsolation和nodeIntegration选项。在这种情况下,Node/Electron
为什么 Gorm 中的 Preload 函数是一个“好的实践”,因为每次调用它时它都会检索给定表的所有记录(热切加载)? 我看到很多人在处理关系时将预加载视为一个很好的解决方案,但我不明白为什么。 最
我已经安装了webpack@2.1.0-beta.27。之前,我使用的是 webpack@2.1.0-beta.22。在我的配置文件中,我使用了 preLoaders 和 postLoaders: p
我有代码: jQuery(img).each(function() { jQuery(this).animate({opacity: 0}); jQuery(t
这是 JPA2 实体监听器注释: @PrePersist @PreRemove @PostPersist @PostRemove @PreUpdate @PostUpdate @PostLoad 但是
Android MapView.preLoad() 方法的真正作用是什么? “API 声明在 map 当前中心预加载图 block ”。这是什么意思,我能否以某种方式使用它来加快 map 在我的 Ma
我正在开发一个 JavaFX 应用程序,该应用程序需要在启动主应用程序阶段之前从文件中加载资源。我完成此任务的解决方案是使用 PreLoader,以便用户在加载资源之前无法与应用程序交互(非常标准的东
好的,首先,这是我的代码。 var loader = document.getElementById("loader"); window.addEventListener("loader", func
在 CSS 中,我为转换编写了一些肮脏的代码,它加载了 24 个不同的蒙版图像。第一次播放时,加载时有延迟,但如果我有一个 div“预加载”它,即在页面加载时播放它,它似乎被缓存了,因此不会再次延迟,
我正在为我的网站制作一个自定义预加载器。它在本地主机上运行良好,但在实时站点上,div 不显示动画,文本仅放置在站点底部。
我使用 CSS 创建了一个预加载器。我想在预加载器完成后在幻灯片放映中显示图像。预加载完成后,图像应该会平滑淡入。这是我的代码结构。 #container{
我是一名优秀的程序员,十分优秀!