jquery/css 中的 Ajax 加载器效果(即不是 ajaxload.info)
有谁知道任何简单的库可以在不使用任何图像的情况下生成一些“加载”效果?
我问的原因是我时不时地使用ajaxload.info,但它只在纯色背景上效果很好。如果有背景渐变或图案,它看起来很糟糕...这也很烦人必须为每种纯色背景重新生成一个。
有什么可以工作的吗?
不必很复杂。只是一些动画效果来提供一些反馈..
Does any know any simple library that can generate some "loading" effects without using any images?
The reason why i'm asking is that i've been using ajaxload.info now and then, but it only really works well on a solid background color.. with a background gradient or pattern, it looks bad... it's also annoying to have to re-generate one for each solid background color.
Anything out there that could work?
Doesn't have to be complicated. Just a few animation effects to give some feedback..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您对渐变有疑问,
只需选择一个限制在一个框中的加载器模板,例如:kit/bar/bar2/bar3..
如果您不想使用动画 gif,您可以使用 css3,但它无法在旧版浏览器上工作,< br>
你可以玩一些 jQuery 动画 - 比如动画文本“正在加载...”,例如:http://james.padolsey.com/javascript/fun-with-jquerys-animate/
[编辑]
以 james padolsey 的示例为例,下面是一个对象的运行演示,用于对给定 div 的文本进行动画处理以显示加载:
http://jsbin.com/ifiki3/edit
顺便说一句' - 我仍然会使用加载jif 用于此任务..
这是一个简单的示例 - 您可以根据需要整理代码,
这里是代码(但我只想转到 jsBin 链接):
在 HTML 处:
if you have problems with the gradients,
just choose a loader template that is confined in a box like: kit/bar/bar2/bar3..
if you don't want to work with an animated gif you can use css3 but then it won't work on older browsers,
and you can play with some jQuery animations - like animating the text "Loading..." look here for example: http://james.padolsey.com/javascript/fun-with-jquerys-animate/
[edit]
taking james padolsey's example, here is a running demo of an object to animate a text of a given div to show loading:
http://jsbin.com/ifiki3/edit
BTW' - i would still use a loading jif for this task..
this is a quick example - you can tidy the code as you like
here is the code(but i would just go to the jsBin link):
at the HTML: