我试图显示动画动图点击按钮,但它是冻结在IE (8,9),在IE11,FF和铬。
是否有任何解决方法。
这是html代码;
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/start/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<title></title>
<style type="text/css">
.cssbox-progress {
background-image: url('images/3.gif');
background-repeat: no-repeat;
}
.loading
{
width: 50px;
height: 10px;
display: none;
background-color: White;
}
</style>
<script >
function ShowProgress() {
setTimeout(function () {
var loading = $(".loading");
loading.show();
}, 200);
}
function test() {
ShowProgress();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="loading" align="center" style="width: 50px; height: 10px; ">
<div class="cssbox-progress" style="width: 50px; height: 10px;"></div>
</div>
<asp:Button ID="btn" runat="server" Text="Login" onclientclick ="test()" />
</form>
</body>
</html>动画GIF

发布于 2015-03-02 19:02:49
作为对评论的回应,这里是这样的场景: 1-你需要显示一个“加载”的动画gif。2- gif在IE8/9.3中不是动画。3-你需要在css中更改源代码,因为你使用的是主题。
答案是
<style>
.cssbox-progress {
content: url('http://i.stack.imgur.com/dS784.gif');
}
</style>和
<img class="cssbox-progress" />我没有在IE8/9上测试它,我使用一个插件来测试它可能的样子,但你应该测试它以确保。
https://stackoverflow.com/questions/28806950
复制相似问题