在中心制作更新进度面板
本文关键字:更新 在中心 | 更新日期: 2023-09-27 18:03:16
我有关于更新进度面板的查询。我想在我的屏幕中间安装更新进度面板!谁能告诉我,这样做的想法是什么??
可以使用css
<style type="text/css" media="screen">
/* commented backslash hack for ie5mac '*/
html, body{height:100%;}
/* end hack */
.CenterPB{
position: absolute;
left: 50%;
top: 50%;
margin-top: -30px; /* make this half your image/element height */
margin-left: -30px; /* make this half your image/element width */
}
</style>
在div
中有进度条<div class="CenterPB" style="height:60px;width:60px;" >Progress bar here</div>
参考:
http://www.sitepoint.com/forums/1243542-post9.html
http://www.search-this.com/2008/05/15/easy-vertical-centering-with-css/
如果你使用jQuery,你也可以试试(非常轻量级的)fixedcenter插件
更新进度面板显示一些内容(一些文本,图像和标记),而系统正在处理…
所以你需要处理你添加的标记…
例如,如果你有一个div,你可以把它放在中间,像这样…
<div style="width:200px;margin:0 auto;">Processing...</div>
将div显示在其容器的中央。
完整例子:
<asp:UpdatePanel ID="updatepnl1" runat="server">
<ContentTemplate>
<asp:GridView id="gv1" runat="server">
</asp:GridView>
<asp:UpdateProgress id="UpdateProg" runat="server">
<ProgressTemplate>
<div style="width:200px;margin:0 auto;">Processing...</div>
</ProgressTemplate>
</asp:UpdateTemplate>
</asp:ContentTemplate>
</asp:UpdatePanel>
当然你应该把css放到一个css文件中,然后应用到一个类中。
:
///Start css
.posCentre{width:200px;margin:0 auto;}
///End css
并将div更改为:
<div class="posCentre">Processing...</div>