我正在使用Ajax updateprogress而且我附加了一个加载gif,问题是我怎么能强迫loading.gif在屏幕的中心,即使你在页面的最底部/顶部?有没有办法让它始终出现在中心?我希望用户在中心看到加
.CenterPB
{
position: absolute;
left: 50%;
top: 50%;
margin-top: -20px; /* make this half your image/element height */
margin-left: -20px; /* make this half your image/element width */
width:auto;
height:auto;
}
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false">
<ProgressTemplate>
<div class="CenterPB" style="height: 40px; width: 40px;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Default/images/progressbar1.gif"
Height="35px" Width="35px" />
Loading ...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
谢谢!
我假设你希望它保持在中间,即使滚动.然后你必须改变:position: absolute;
在
position: fixed;
